Skip to content

Commit 12409dd

Browse files
authored
Merge pull request hestiacp#1423 from serghey-rodin/madeITBelgium-patch-4
hestiacp#1421 - Fix Backup retention
2 parents a65fb3c + 9059167 commit 12409dd

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)