From 882fd3be26d177db2271922770f018b7ebfef725 Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 9 Dec 2022 11:38:33 +0100 Subject: [PATCH 1/2] add a volume for redis Signed-off-by: Simon L --- php/containers.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/php/containers.json b/php/containers.json index b603fe09..daed5d6f 100644 --- a/php/containers.json +++ b/php/containers.json @@ -178,7 +178,13 @@ "REDIS_HOST_PASSWORD=%REDIS_PASSWORD%", "TZ=%TIMEZONE%" ], - "volumes": [], + "volumes": [ + { + "name": "nextcloud_aio_redis", + "location": "/data", + "writeable": true + } + ], "secrets": [ "REDIS_PASSWORD", "ONLYOFFICE_SECRET" From 79946a876c3a1018110d7e2fa4a574b435e8198a Mon Sep 17 00:00:00 2001 From: Simon L Date: Tue, 13 Dec 2022 14:32:38 +0100 Subject: [PATCH 2/2] 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": [