remove skipped db backup
This commit is contained in:
parent
22ed463637
commit
0a7c2676e8
3 changed files with 11 additions and 12 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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/'
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue