95 lines
2.1 KiB
Markdown
95 lines
2.1 KiB
Markdown
# cloud.limbosolutions.com
|
|
|
|
Welcome to public repository of [https://cloud.limbosolutions.com](https://cloud.limbosolutions.com)
|
|
|
|
Using [NextCloud](https://nextcloud.com/)
|
|
|
|
- [command](#command)
|
|
- [maintenance mode](#maintenance-mode)
|
|
- [scan files](#scan-files)
|
|
- [preview generator](#preview-generator)
|
|
- [repair tree](#repair-tree)
|
|
- [delete file locks](#delete-file-locks)
|
|
- [Setup](#setup)
|
|
- [Requirements - infra](#requirements---infra)
|
|
- [mariadb database](#mariadb-database)
|
|
|
|
## command
|
|
|
|
``` bash
|
|
su -s /bin/bash www-data -c "php occ upgrade;"
|
|
```
|
|
|
|
## maintenance mode
|
|
|
|
``` bash
|
|
su -s /bin/bash www-data -c "php -d memory_limit=-1 /var/www/html/occ maintenance:mode --on;"
|
|
su -s /bin/bash www-data -c "php -d memory_limit=-1 /var/www/html/occ maintenance:mode --off"
|
|
```
|
|
|
|
### scan files
|
|
|
|
``` bash
|
|
su -s /bin/bash www-data -c "php -d memory_limit=-1 /var/www/html/occ files:scan --all"
|
|
|
|
```
|
|
|
|
### preview generator
|
|
|
|
<https://apps.nextcloud.com/apps/previewgenerator>
|
|
|
|
``` bash
|
|
su -s /bin/bash www-data -c "./occ preview:generate-all -vvv"
|
|
su -s /bin/bash www-data -c "./occ preview:generate-all --path=marcio.fernandes/files/Photos -vvv"
|
|
```
|
|
|
|
``` bash
|
|
# cron job
|
|
php /var/www/nextcloud/occ preview:pre-generate
|
|
```
|
|
|
|
### repair tree
|
|
|
|
``` bash
|
|
su -s /bin/bash www-data -c "php occ files:repair-tree"
|
|
```
|
|
|
|
### delete file locks
|
|
|
|
``` bash
|
|
# execute on mariadb
|
|
DELETE FROM oc_file_locks WHERE 1;
|
|
```
|
|
|
|
## Setup
|
|
|
|
- deploy mariadb
|
|
- nextcloud helm chart
|
|
|
|
```bash
|
|
./ops-scripts/apply-app.sh
|
|
```
|
|
|
|
## Requirements - infra
|
|
|
|
```bash
|
|
./ops-scripts/apply-infra.sh
|
|
```
|
|
|
|
## mariadb database
|
|
|
|
**Connect to maria db:**
|
|
|
|
``` bash
|
|
kubectl exec -it nextcloud-mariadb-0 -- mariadb -u nextcloud -h nextcloud-mariadb.cloud-limbosolutions-com.svc.cluster.local -p
|
|
```
|
|
|
|
**Restore database:**
|
|
|
|
``` bash
|
|
kubectl run mysql-client -i --rm \
|
|
--image=mysql:latest --restart=Never -- \
|
|
mysql -h nextcloud-mariadb.cloud-limbosolutions-com.svc.cluster.local \
|
|
-u ???? -p???? nextcloud < ./tmp/host-nextcloud-full-backup.sql
|
|
```
|