Optimized update process

This commit is contained in:
Kevin Veen-Birkenbach 2021-11-11 14:25:19 +01:00
parent 5dd7645834
commit 13c600425a
3 changed files with 22 additions and 10 deletions

View File

@ -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/

View File

@ -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

View File

@ -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