Update backup.sh

This commit is contained in:
2020-08-22 02:29:22 +02:00
committed by GitHub
parent 6c7de7f052
commit c84a5702b2
+4 -1
View File
@@ -63,6 +63,9 @@ do_backup
if [ ! -z $keepfiles ]; then
remove=$(ls -d -1tr $destination/*.xml | tail -n +$keepfiles | head -n1)
if [ ! -z $remove ]; then
rm -f $(ls -d -1tr $destination/*.xml | tail -n -$keepfiles | head -n1)
keepfiles=$((keepfiles + 1))
del=$(ls $destination/*.xml | tail -n -$keepfiles | head -n1)
rm -f $del
echo "Backup removed at $del"
fi
fi