File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -615,7 +615,7 @@ ftp_backup() {
615615 fi
616616 backups_count=$( echo " $backup_list " | wc -l)
617617 if [ " $backups_count " -ge " $BACKUPS " ]; then
618- backups_rm_number=$(( backups_count - BACKUPS))
618+ backups_rm_number=$(( backups_count - BACKUPS + 1 ))
619619 for backup in $( echo " $backup_list " | head -n $backups_rm_number ) ; do
620620 backup_date=$( echo $backup | sed -e " s/$user .//" -e " s/.tar$//" )
621621 echo -e " $( date " +%F %T" ) Rotated ftp backup: $backup_date " | \
@@ -770,7 +770,7 @@ sftp_backup() {
770770 fi
771771 backups_count=$( echo " $backup_list " | wc -l)
772772 if [ " $backups_count " -ge " $BACKUPS " ]; then
773- backups_rm_number=$(( backups_count - BACKUPS))
773+ backups_rm_number=$(( backups_count - BACKUPS + 1 ))
774774 for backup in $( echo " $backup_list " | head -n $backups_rm_number ) ; do
775775 backup_date=$( echo $backup | sed -e " s/$user .//" -e " s/.tar.*$//" )
776776 echo -e " $( date " +%F %T" ) Rotated sftp backup: $backup_date " | \
You can’t perform that action at this time.
0 commit comments