Backup and restore in foreman-maintain

Hi folks,
I’m working with @John_Mitsch on moving scripts for backup and restore into foreman-maintain where they should find better home.

It is good opportunity for fixing usability/design issues if there are any.
I’m looking for things that bother you as a user or maintainer of the scripts. Are there any?

One such thing I’m struggling with is the katello-backup CLI options.
Currently we have:

–online-backup
–logical-db-backup
–snapshot
(–offline-backup) # not there as a n option but default beahvior

According to the code the --online-backup, --snapshot, and offline backup are mutually exclusive. --logical-db-backup on the other hand can be combined with any of the previous options. These relations are not clear from the help and I’d say nor expected. Would it make sense to replace these options with enum option (e.g. --backup-strategy ) with available values online, offline, snapshot, solid (suggest better name) and define clearly how these scenarios should behave? Any reasons to keep the current state?

Cheers,
Martin

Its funny you mention this as I was thinking about the same thing earlier, there has been a lot of options added over time and I think the usability can be improved with some restructuring.

Having --backup-strategy with clearly documented strategies would be a great idea.

Another option is to have foreman-maintain backup <strategy>, which will allow for better help menus and the ability to add unique options for a backup type.

Another thing I would like to see changed is “logical” backup. I’m not sure if there are historical reasons for using the word “logical”, but in my experience, that option is confusing to most without any context. Maybe we can call it complete, full, or extensive with a description that an online and offline backup will be performed?

Great idea, this could make help and the handling of the strategy specific options much cleaner.

Another small thing that we can do to increase usability is to space out the timestamp on the folder created

i.e. go from

katello-backup-20180404204124

to

katello-backup-2018-04-04-20-41-24

or something similar. We just can’t use special characters here as its a filename. This would make the timestamp more human-readable when trying to determine when the backup is from

1 Like