mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-03-29 04:23:34 +01:00
1.8 KiB
1.8 KiB
Update 🔄
To update the Nextcloud container, execute the following commands on the server:
docker exec -it -u www-data nextcloud-application /var/www/html/occ maintenance:mode --on &&
export COMPOSE_HTTP_TIMEOUT=600 &&
export DOCKER_CLIENT_TIMEOUT=600 &&
docker-compose down
Afterwards, update the applications.nextcloud.version variable to the next version and run this repository with this Ansible role.
Note:
It is only possible to update from one to the next major version at a time.
Wait for the update to finish.
Verify the update by checking the logs:
docker-compose logs application
and
docker-compose exec -it application top
If Nextcloud remains in maintenance mode after the update, try the following:
docker exec -it -u www-data nextcloud-application/var/www/html/occ maintenance:mode --on
docker exec -it -u www-data nextcloud-application /var/www/html/occ upgrade
docker exec -it -u www-data nextcloud-application /var/www/html/occ maintenance:mode --off
If the update process fails, execute:
docker exec -it -u www-data nextcloud-application /var/www/html/occ maintenance:repair --include-expensive
and disable any non-functioning apps.
Recover Latest Backup 💾
cd {{path_docker_compose_instances}}nextcloud &&
docker-compose down &&
docker-compose exec -i database mysql -u nextcloud -pPASSWORT nextcloud < "/Backups/$(sha256sum /etc/machine-id | head -c 64)/backup-docker-to-local/latest/nextcloud_database/sql/backup.sql" &&
cd {{path_administrator_scripts}}backup-docker-to-local &&
bash ./recover-docker-from-local.sh "nextcloud_data" "$(sha256sum /etc/machine-id | head -c 64)"