Backup count keep
This commit is contained in:
parent
b8d0e9de8a
commit
9d0654d604
@ -59,11 +59,11 @@ while read line; do
|
||||
|
||||
echo " Check for existing backups "$FILENAME \(Have: $fCount\)
|
||||
|
||||
# keep up to 7 backup
|
||||
if [ $fCount -ne 7 ]; then
|
||||
# keep up to X backups
|
||||
if [ $fCount -ne $KEEP ]; then
|
||||
|
||||
# delete count
|
||||
dCount=`expr $fCount - 7`
|
||||
dCount=`expr $fCount - $KEEP`
|
||||
|
||||
# loop over files
|
||||
for files in $BAKDIR/*$FILENAME*.gz; do
|
||||
|
@ -5,3 +5,5 @@ ERRLOG=backup_errors.log
|
||||
|
||||
BMOUNT=/mnt/backup
|
||||
BAKDIR=$BMOUNT/backup/cron
|
||||
|
||||
KEEP=7
|
||||
|
Loading…
Reference in New Issue
Block a user