From d927e5a22690d1c97fd71ee6da0a2be40f7ced52 Mon Sep 17 00:00:00 2001 From: szaimen Date: Wed, 29 Dec 2021 19:57:26 +0100 Subject: [PATCH] fix the restore process Signed-off-by: szaimen --- Containers/borgbackup/backupscript.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index 3d40e83a..62cf874e 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -183,8 +183,8 @@ if [ "$BORG_MODE" = restore ]; then fi if ! rsync --stats --archive --human-readable -vv --delete \ --exclude "nextcloud_aio_mastercontainer/data/backup_archives.list" \ - --exclude "nextcloud_aio_mastercontainer/data/session/"** \ - --exclude "nextcloud_aio_mastercontainer/data/certs/"** \ + --exclude "nextcloud_aio_mastercontainer/session/"** \ + --exclude "nextcloud_aio_mastercontainer/certs/"** \ /tmp/borg/nextcloud_aio_volumes/ /nextcloud_aio_volumes; then echo "Something failed while restoring the boot partition." umount /tmp/borg @@ -202,6 +202,9 @@ if [ "$BORG_MODE" = restore ]; then touch "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/skip.update" chmod 777 "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/skip.update" + # Set backup-mode to restore since it was a restore + sed -i 's/"backup-mode":"[a-z]\+"/"backup-mode":"restore"/g' /nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/configuration.json + exit 0 fi