From 17e1c0250ff80c23f3e4d879ceb2750af1c51fdc Mon Sep 17 00:00:00 2001 From: szaimen Date: Tue, 7 Dec 2021 17:49:00 +0100 Subject: [PATCH] exclude the session and certs folder from restore Signed-off-by: szaimen --- Containers/borgbackup/backupscript.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index 9fdb0ccc..469bb2ea 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -171,7 +171,11 @@ if [ "$BORG_MODE" = restore ]; then echo "Could not mount the backup!" exit 1 fi - if ! rsync --stats --archive --human-readable -vv --delete --exclude "nextcloud_aio_mastercontainer/data/backup_archives.list" /tmp/borg/nextcloud_aio_volumes/ /nextcloud_aio_volumes; then + 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/"** \ + /tmp/borg/nextcloud_aio_volumes/ /nextcloud_aio_volumes; then echo "Something failed while restoring the boot partition." umount /tmp/borg exit 1