Keep a second backup set

This commit is contained in:
Naglfar 2021-10-21 16:54:02 +02:00
parent d9c0078e2e
commit 2a4dddf376
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ BACKUPS=/var/backups
DUMPS=7 DUMPS=7
LEVEL0=$(find $BACKUPS -name "*full.tgz" | sort | tail -n1) LEVEL0=$(find $BACKUPS -name "*full.tgz" | sort | tail -n1)
INCR=$(find $BACKUPS -name "*incremental.tgz" | wc -l) INCR=$(find $BACKUPS -name "*incremental.tgz" -newer $LEVEL0 | wc -l)
if [ ! -z $LEVEL0 ] && [ $INCR -le $DUMPS ] if [ ! -z $LEVEL0 ] && [ $INCR -le $DUMPS ]
then then