Backup count keep

This commit is contained in:
斟酌 鵬兄 2014-04-20 13:48:36 -05:00
parent b8d0e9de8a
commit 9d0654d604
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -5,3 +5,5 @@ ERRLOG=backup_errors.log
BMOUNT=/mnt/backup
BAKDIR=$BMOUNT/backup/cron
KEEP=7