backup-script/nextcloud.sh

10 lines
255 B
Bash
Raw Normal View History

2022-02-20 19:05:47 +01:00
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
}