diff --git a/infrastructure/docker-backup/image/resources/backup.sh b/infrastructure/docker-backup/image/resources/backup.sh index ec74cef..ba81889 100755 --- a/infrastructure/docker-backup/image/resources/backup.sh +++ b/infrastructure/docker-backup/image/resources/backup.sh @@ -16,7 +16,7 @@ function main() { #disable for faster testing #backup-roles 'oc_' #backup-db-dump - #echo test-content > /var/backups/tmpfile + ls -l /var/backups/ backup-directory '/var/backups/' end-maintenance.sh diff --git a/infrastructure/docker-backup/image/resources/end-maintenance.sh b/infrastructure/docker-backup/image/resources/end-maintenance.sh index 0013509..0976fe5 100644 --- a/infrastructure/docker-backup/image/resources/end-maintenance.sh +++ b/infrastructure/docker-backup/image/resources/end-maintenance.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -x + if test -f "/var/backups/config/config.orig"; then rm /var/backups/config/config.php diff --git a/infrastructure/docker-backup/image/resources/restore.sh b/infrastructure/docker-backup/image/resources/restore.sh index 1ebef16..eb5923b 100755 --- a/infrastructure/docker-backup/image/resources/restore.sh +++ b/infrastructure/docker-backup/image/resources/restore.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -Eeo pipefail +set -Eeox pipefail function main() { @@ -15,8 +15,9 @@ function main() { drop-create-db - restore-roles - restore-db + #skip for fast testing + #restore-roles + #restore-db restore-directory '/var/backups/' } diff --git a/infrastructure/docker-backup/image/resources/start-maintenance.sh b/infrastructure/docker-backup/image/resources/start-maintenance.sh index 474ede1..0915a37 100644 --- a/infrastructure/docker-backup/image/resources/start-maintenance.sh +++ b/infrastructure/docker-backup/image/resources/start-maintenance.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -x + if [ ! -f "/var/backups/config/config.orig" ]; then rm -f /var/backups/config/config.orig