removed maintenance mode from backup and restore
This commit is contained in:
parent
34895b7372
commit
82751c0b54
2 changed files with 1 additions and 6 deletions
|
@ -1,8 +1,6 @@
|
|||
su -s /bin/bash -c 'php occ maintenance:mode --on' www-data
|
||||
set -o pipefail
|
||||
# backup database dump
|
||||
pg_dump -d $(cat ${POSTGRES_DB_FILE}) -h $POSTGRES_SERVICE -p $POSTGRES_PORT -U $(cat ${POSTGRES_USER_FILE}) --no-password --serializable-deferrable --clean --no-privileges | \
|
||||
restic -r $RESTIC_REPOSITORY --verbose backup --stdin --tag DB_Backup
|
||||
# backup nextcloud filesystem
|
||||
restic -r $RESTIC_REPOSITORY backup /var/backups/ --tag Nextcloud_Filesystem
|
||||
su -s /bin/bash -c 'php occ maintenance:mode --off' www-data
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
# Restore Nextcloud Filesystem
|
||||
# turn on maintenance mode
|
||||
su -s /bin/bash -c 'php occ maintenance:mode --on' www-data
|
||||
|
||||
# Reads restore snapshot_ID from first CLI Argument
|
||||
restic -r $RESTIC_REPOSITORY restore $1 --target /
|
||||
|
||||
|
@ -12,5 +11,3 @@ psql -d template1 -h $POSTGRES_SERVICE -p $POSTGRES_PORT -U $(cat ${POSTGRES_USE
|
|||
restic -r $RESTIC_REPOSITORY restore $2 --target test-stdin-$2
|
||||
# read folder and restore db entries
|
||||
psql -d $(cat ${POSTGRES_DB_FILE}) -h $POSTGRES_SERVICE -p $POSTGRES_PORT -U $(cat ${POSTGRES_USER_FILE}) --no-password < test-stdin-$2
|
||||
# turn off maintenance mode
|
||||
su -s /bin/bash -c 'php occ maintenance:mode --off' www-data
|
||||
|
|
Loading…
Reference in a new issue