mirror of
https://github.com/serghey-rodin/vesta.git
synced 2026-09-11 05:40:13 +02:00
Merge pull request #1423 from serghey-rodin/madeITBelgium-patch-4
#1421 - Fix Backup retention
This commit is contained in:
@@ -499,7 +499,7 @@ local_backup(){
|
||||
backup_list=$(ls -lrt $BACKUP/ |awk '{print $9}' |grep "^$user\." | grep ".tar")
|
||||
backups_count=$(echo "$backup_list" |wc -l)
|
||||
if [ "$BACKUPS" -le "$backups_count" ]; then
|
||||
backups_rm_number=$((backups_count - BACKUPS))
|
||||
backups_rm_number=$((backups_count - BACKUPS + 1))
|
||||
|
||||
# Removing old backup
|
||||
for backup in $(echo "$backup_list" |head -n $backups_rm_number); do
|
||||
|
||||
Reference in New Issue
Block a user