backup-script/nextcloud.sh

9 lines
255 B
Bash

pre() {
docker exec nextcloud_db_1 pg_dump -U postgres nextcloud > /tmp/nextcloud.sql
docker exec -u 33 nextcloud_app_1 ./occ maintenance:mode --on
}
post() {
rm /tmp/nextcloud.sql
docker exec -u 33 nextcloud_app_1 ./occ maintenance:mode --off
}