feat: add backup prune, to delete old backup

This commit is contained in:
2024-02-17 18:20:35 +01:00
parent 6426be8b8e
commit af8a50f646
5 changed files with 65 additions and 39 deletions

View File

@@ -23,6 +23,8 @@ func init() {
//Backup
BackupCmd.PersistentFlags().StringP("mode", "m", "default", "Set execution mode. default or scheduled")
BackupCmd.PersistentFlags().StringP("period", "", "0 1 * * *", "Set schedule period time")
BackupCmd.PersistentFlags().BoolP("prune", "", false, "Prune old backup")
BackupCmd.PersistentFlags().IntP("keep-last", "", 7, "keep all backup and delete within this time interval, default 7 days")
BackupCmd.PersistentFlags().BoolP("disable-compression", "", false, "Disable backup compression")
}