remove skipped db backup

This commit is contained in:
ansgarz 2021-12-10 10:21:36 +01:00
parent 22ed463637
commit 0a7c2676e8
3 changed files with 11 additions and 12 deletions

View file

@ -1,6 +1,6 @@
#!/bin/bash
set -o pipefail
set -xo pipefail
function main() {
@ -13,12 +13,10 @@ function main() {
file_env POSTGRES_USER
file_env RESTIC_DAYS_TO_KEEP 14
echo re-add lines !!!
#disable for faster testing
#backup-roles 'oc_'
#backup-db-dump
backup-roles 'oc_'
backup-db-dump
ls -l /var/backups/
# backup-directory '/var/backups/'
backup-directory '/var/backups/'
end-maintenance.sh
}

View file

@ -13,13 +13,11 @@ function main() {
file_env POSTGRES_PASSWORD
file_env POSTGRES_USER
echo re-add lines !!!
# drop-create-db
drop-create-db
#skip for fast testing
#restore-roles
#restore-db
# restore-directory '/var/backups/'
restore-roles
restore-db
restore-directory '/var/backups/'
}

View file

@ -6,7 +6,10 @@ if [ ! -f "/var/backups/config/config.orig" ]; then
rm -f /var/backups/config/config.orig
cp /var/backups/config/config.php /var/backups/config/config.orig
# put nextcloud in maintenance mode
sed -i "s/);/ \'maintenance\' => true,\n);/g" /var/backups/config/config.php
chown www-data:root /var/backups/config/config.php
touch /var/backups/config/config.php