Open sidevesh opened 1 year ago
@zhangyuannie are you planning on working on this or have an idea of a timeframe when this can be implemented ? If you don't have plans to add this anytime soon then would you be interested and merge in if I implement this in a PR ?
Hey @sidevesh, PR welcomed! :smile:
I am thinking of moving the Preferences option to a bottom tab instead of the dropdown menu, and adding the Post snapshot, Post cleanup hook script text fields there along with toggles for #19 (Don't backup on battery power) and #20 (Remove older snapshots if low on space) and text field to set low space limit, does that sound good ?
Also, I guess Don't backup on battery and Remove older snapshots when low on space limit would have to be added to gschema to store these local config, again @zhangyuannie can you confirm if the above changes that I have outlined are okay with you ?
I am thinking of moving the Preferences option to a bottom tab instead of the dropdown menu
I'm feeling they should probably be in the "Schedule" view, given these are schedule settings.
Also, I guess Don't backup on battery and Remove older snapshots when low on space limit would have to be added to gschema
You probably have to add them to PKGSYSCONFDIR
instead of gschema, as this is not a user config but a device wide / system config.
Overall LGTM! Please send your PR feature by feature btw so it's easier to review. Thanks!
I'm feeling they should probably be in the "Schedule" view, given these are schedule settings.
19 is gonna be applicable only for the scheduled backups (if user attempts backup manually then it does not matter if they are on battery power or not, their choice),
so that being in Schedule makes sense,
Hence moving those to a Preferences tab made sense, what do you think?
For post snapshot hooks yeah, it makes sense to put it in Preferences. Let's use the existing preferences in the hamburger menu first as my prediction is that this is likely not a feature an average user would use, although a needed one. We can consider making it into a tab in the future if necessary.
Thanks!
Describe the problem your feature would solve
Be able to take actions after a snapshot like clean up or move backup to offsite etc
Describe the solution you'd like
Could you add an option to execute scripts on state changes like when a snapshot completes
Additional context
Post / Pre operation hooks is a fairly common feature in most backup suites and even though I love Butter's simplicity, just having this feature would allow for a lot more complex workflows for those who want it. Personally I want to use this for sending the btrfs snapshot to a local server to have backups be available even if the device fails, there are a lot of BTRFS backup solutions but seems like none of them have gotten around to or have any ability to backup to a remote service, which I think is fairly critical