892 B
892 B
Steps to upgrade Nextcloud from one version to another.
-
Put the Nextcloud instance into maintenance mode docker exec --user www-data nextcloud-app-1 php occ maintenance:mode --on
Note that 'docker exec' is used to run commands within the Nextcloud docker container; and '--user www-data' is used to run as the user that owns all of the Nextcloud files.
-
Back up the Nextcloud container's files to a location outside the container's mounted volume. 'rsync' is recommended:
rsync -Aavx /mnt/storage/appdata/nextcloud/www/ /
rsync should be run as root. rsync with these options should preserve file ownership & permissions
-
Back up MariaDB database:
docker exec nextcloud-db-container-name mysqldump --single-transaction -h localhost -u nextcloud_user -pnextcloud_password nextcloud_db_name > nextcloud-sqlbkp_$(date +"%Y%m%d").bak