From f32a91826da69ffc5060f5bfbbc8f1bb05e5abc7 Mon Sep 17 00:00:00 2001 From: ansgarz Date: Thu, 9 Dec 2021 18:16:40 +0100 Subject: [PATCH] [skip ci] add debugging info --- infrastructure/docker-backup/image/resources/backup.sh | 2 +- .../docker-backup/image/resources/end-maintenance.sh | 2 ++ infrastructure/docker-backup/image/resources/restore.sh | 7 ++++--- .../docker-backup/image/resources/start-maintenance.sh | 2 ++ 4 files changed, 9 insertions(+), 4 deletions(-) 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