(Grav GitSync) Automatic Commit from RealStickman

This commit is contained in:
RealStickman 2022-07-03 18:50:28 +02:00 committed by GitSync
parent 432d93d595
commit e3bfa5f306

View File

@ -105,16 +105,16 @@ Array of trusted domains.
## Maintenance ## Maintenance
### Maintenance Mode ### Maintenance Mode
Enable maintenance mode to prevent data inconsistencies Enable maintenance mode to prevent data inconsistencies
`sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on` `$ sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on`
To disable maintenance mode again, run the same command with `--off` instead of `--on` To disable maintenance mode again, run the same command with `--off` instead of `--on`
### Upgrade with CLI ### Upgrade with CLI
`sudo -u www-data php /var/www/nextcloud/updater/updater.phar` `$ sudo -u www-data php /var/www/nextcloud/updater/updater.phar`
### Backup Database ### Backup Database
Dump database to file Dump database to file
``mysqldump --single-transaction -h [server] -u [username] -p[password] [db_name] > nextcloud-sqlbkp_`date +"%Y%m%d"`.bak`` `$ mysqldump --single-transaction -h [server] -u [username] -p[password] [db_name] > nextcloud-sqlbkp_`date +"%Y%m%d"`.bak`
> [Official documentation](https://docs.nextcloud.com/server/latest/admin_manual/maintenance/backup.html) > [Official documentation](https://docs.nextcloud.com/server/latest/admin_manual/maintenance/backup.html)
@ -143,7 +143,7 @@ mariadb -h $server -u $username -p$password -e "DROP DATABASE nextcloud"
mariadb -h $server -u $username -p$password -e "CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci" mariadb -h $server -u $username -p$password -e "CREATE DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci"
``` ```
`mariadb -h $server -u $username -p$password $db_name < nextcloud-sqlbkp.bak` `$ mariadb -h $server -u $username -p$password $db_name < nextcloud-sqlbkp.bak`
> [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/maintenance/restore.html) > [Nextcloud documentation](https://docs.nextcloud.com/server/latest/admin_manual/maintenance/restore.html)