Skip to content

Commit 9059167

Browse files
hestiacp#1421 - Fix Backup retention
Fix hestiacp#1421
1 parent 351d2a7 commit 9059167

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/v-backup-user

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ local_backup(){
499499
backup_list=$(ls -lrt $BACKUP/ |awk '{print $9}' |grep "^$user\." | grep ".tar")
500500
backups_count=$(echo "$backup_list" |wc -l)
501501
if [ "$BACKUPS" -le "$backups_count" ]; then
502-
backups_rm_number=$((backups_count - BACKUPS))
502+
backups_rm_number=$((backups_count - BACKUPS + 1))
503503

504504
# Removing old backup
505505
for backup in $(echo "$backup_list" |head -n $backups_rm_number); do

0 commit comments

Comments
 (0)