From cc378bec13cfaca370beb4e38281cd57b29caa64 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Tue, 26 Nov 2024 15:44:49 +0100 Subject: [PATCH] Allow specifying additional patterns to back up --- scripts/Common/Software/docker/services/service.fish | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/Common/Software/docker/services/service.fish b/scripts/Common/Software/docker/services/service.fish index 79cdd6d0..01e6fbb3 100644 --- a/scripts/Common/Software/docker/services/service.fish +++ b/scripts/Common/Software/docker/services/service.fish @@ -172,7 +172,17 @@ begin sudo systemctl restart nginx end + function getExtraBackupPatterns + echo "" + end + function getBackupArgs - printf "%s\n" --base-directory (getServiceRoot $argv) --hidden --no-ignore "^(docker-compose\.secrets\.yml|data)\$" + set -l extraPatterns (getExtraBackupPatterns) + + if [ -n "$extraPatterns" ] + set extraPatterns "|$extraPatterns" + end + + printf "%s\n" --base-directory (getServiceRoot $argv) --hidden --no-ignore "^(docker-compose\.secrets\.yml|data)\$$extraPatterns" end end