diff --git a/roles/docker-nextcloud/README.md b/roles/docker-nextcloud/README.md index 02e3e5a5..a5d73f23 100644 --- a/roles/docker-nextcloud/README.md +++ b/roles/docker-nextcloud/README.md @@ -11,16 +11,17 @@ To access the database execute To update the nextcloud container execute the following commands on the server: ```bash - # Requiered: - docker stop nextcloud_application_1 && docker rm $(docker ps -aqf "name=nextcloud_application_1") && - # Optional: - docker stop nextcloud_web_1 && docker rm $(docker ps -aqf "name=nextcloud_web_1") && - docker stop nextcloud_database_1 && docker rm $(docker ps -aqf "name=nextcloud_database_1") && - docker stop nextcloud_cron_1 && docker rm $(docker ps -aqf "name=nextcloud_cron_1") && - docker stop nextcloud_redis_1 && docker rm $(docker ps -aqf "name=nextcloud_redis_1") +export COMPOSE_HTTP_TIMEOUT=600 +export DOCKER_CLIENT_TIMEOUT=600 +cd /home/administrator/docker-compose/nextcloud && +docker-compose pull && +docker-compose up -d ``` + Afterwards update the ***nextcloud_version*** variable to the next version and run the server manager. +It is only possible to update from one to the next major version at a time + You can check the status of the update by typing in: ```bash @@ -43,6 +44,15 @@ If the update process fails execute and disable the mal functioning apps. +## recover latest backup +```bash +cd /home/administrator/docker-compose/nextcloud && +docker-compose down && +cd /usr/local/bin/docker-volume-backup && +bash ./docker-volume-recover.sh "nextcloud_data" "$(sha256sum /etc/machine-id | head -c 64)" && +bash ./docker-volume-recover.sh "nextcloud_database" "$(sha256sum /etc/machine-id | head -c 64)" +``` + ## database debuging ```bash @@ -73,3 +83,4 @@ To use occ run: - https://wolfgang.gassler.org/reset-password-mariadb-mysql-docker/ - https://unix.stackexchange.com/questions/478855/ansible-docker-container-and-depends-on - https://github.com/gdiepen/docker-convenience-scripts +- https://techoverflow.net/2021/08/17/how-to-fix-nextcloud-4047-innodb-refuses-to-write-tables-with-row_formatcompressed-or-key_block_size/ diff --git a/roles/docker-nextcloud/handlers/main.yml b/roles/docker-nextcloud/handlers/main.yml index 05865b06..bba6641f 100644 --- a/roles/docker-nextcloud/handlers/main.yml +++ b/roles/docker-nextcloud/handlers/main.yml @@ -4,5 +4,5 @@ cmd: docker-compose -p nextcloud up -d --force-recreate chdir: /home/administrator/docker-compose/nextcloud/ environment: - COMPOSE_HTTP_TIMEOUT: 120 - DOCKER_CLIENT_TIMEOUT: 120 + COMPOSE_HTTP_TIMEOUT: 600 + DOCKER_CLIENT_TIMEOUT: 600 diff --git a/roles/docker-nextcloud/templates/docker-compose.yml.j2 b/roles/docker-nextcloud/templates/docker-compose.yml.j2 index 5404d07e..256b2201 100644 --- a/roles/docker-nextcloud/templates/docker-compose.yml.j2 +++ b/roles/docker-nextcloud/templates/docker-compose.yml.j2 @@ -19,6 +19,7 @@ services: logging: driver: journald image: mariadb + command: "--transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed" environment: MYSQL_DATABASE: "nextcloud" MYSQL_USER: "nextcloud" @@ -47,7 +48,7 @@ services: image: "nextcloud:{{nextcloud_version}}-fpm-alpine" restart: always logging: - driver: journald + driver: journald volumes: - data:/var/www/html entrypoint: /cron.sh