Compare commits

..
1 Commits
Author SHA1 Message Date
adam 09a4d6485f exactly 100 lines :) 2026-01-14 14:45:43 +00:00
+1 -3
View File
@@ -52,7 +52,7 @@ Options:
-d Directory where backups will be stored (default: current directory)
-t Manager type: lxc or incus (default: lxc)
-x Compression algorithm (e.g. gzip, zstd, none)
-c Cleanup old backups and keep last <n> (default: keep all)
-c Cleanup old backups keeping a set number (default: 2)
-h Show this message
EOF
exit 1
@@ -90,8 +90,6 @@ prune_backups() {
if [[ ${#backup_files[@]} -gt 0 ]]; then
echo "Removing ${#backup_files[@]} old backup files for $vm (keeping last $retention files)"
printf '%s\0' "${backup_files[@]}" | xargs -0 rm -fv > /dev/null
elif [[ "${retention}" -eq 0 ]]; then
echo "Keeping all existing backups for $vm"
else
echo "No old backups to remove for $vm"
fi