From 79946a876c3a1018110d7e2fa4a574b435e8198a Mon Sep 17 00:00:00 2001 From: Simon L Date: Tue, 13 Dec 2022 14:32:38 +0100 Subject: [PATCH] remove the redis database once a backup gets restored Signed-off-by: Simon L --- Containers/borgbackup/backupscript.sh | 3 +++ php/containers.json | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index bacfa1b5..7640d441 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -337,6 +337,9 @@ if [ "$BORG_MODE" = restore ]; then # Add file to Nextcloud container so that it performs a fingerprint update the next time touch "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/fingerprint.update" chmod 777 "/nextcloud_aio_volumes/nextcloud_aio_nextcloud_data/fingerprint.update" + + # Delete redis cache + rm -f "/mnt/redis/dump.rdb" fi # Do the Backup check diff --git a/php/containers.json b/php/containers.json index daed5d6f..76247dd3 100644 --- a/php/containers.json +++ b/php/containers.json @@ -301,6 +301,11 @@ "name": "nextcloud_aio_elasticsearch", "location": "/nextcloud_aio_volumes/nextcloud_aio_elasticsearch", "writeable": true + }, + { + "name": "nextcloud_aio_redis", + "location": "/mnt/redis", + "writeable": true } ], "secrets": [