From b6ce9dae4604cf87c79d397a538c436b81e12bcc Mon Sep 17 00:00:00 2001 From: Naglfar Date: Wed, 13 Oct 2021 11:45:33 +0200 Subject: [PATCH] Excludes reference, in case it is also located, to keep it. --- roles/shell/files/usr/local/bin/backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/shell/files/usr/local/bin/backup b/roles/shell/files/usr/local/bin/backup index d40fd9d..7dede18 100644 --- a/roles/shell/files/usr/local/bin/backup +++ b/roles/shell/files/usr/local/bin/backup @@ -15,7 +15,7 @@ else TYPE=full rm -f $BACKUPS/*.snapshot # Remove dumps and the previous backup if there is another one. - find $BACKUPS -name "*tgz" ! -newer $LEVEL0 -exec rm {} \; + find $BACKUPS -name "*tgz" ! -newer $LEVEL0 ! -wholename $LEVEL0 -exec rm {} \; fi nice tar -cz \