computer-playbook/roles/docker-nextcloud/README.md

3.1 KiB

role docker-nextcloud

database access

To access the database execute

  docker exec -it nextcloud_database_1 /bin/mysql -u nextcloud -p

update

To update the nextcloud container execute the following commands on the server:

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:

  docker logs nextcloud_application_1

If nextcloud stays in the maintenance mode after the update try the following:

  docker exec -it -u www-data nextcloud_application_1 /var/www/html/occ maintenance:mode --on
  docker exec -it -u www-data nextcloud_application_1 /var/www/html/occ upgrade
  docker exec -it -u www-data nextcloud_application_1 /var/www/html/occ maintenance:mode --off

If the update process fails execute

  docker exec -it -u www-data nextcloud_application_1 /var/www/html/occ maintenance:repair

and disable the mal functioning apps.

recover latest backup

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

  docker exec -it -u www-data nextcloud_database_1 /bin/mysql -u nextcloud -p

occ

To use occ run:

  docker exec -it -u www-data nextcloud_application_1 /var/www/html/occ

unlock files

  docker exec -it -u www-data nextcloud_application_1 /var/www/html/occ maintenance:mode --on
  docker exec -it nextcloud_database_1 mysql -u nextcloud -pPASSWORD1234132 -D nextcloud -e "delete from oc_file_locks where 1"
  docker exec -it -u www-data nextcloud_application_1 /var/www/html/occ maintenance:mode --off

further information