-
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to schedule snapshot, prune and check after another (not using cron or similar) #590
Comments
I think there's definitely something that could be improved here, adding even more flexible scheduling of some sort is something I'm keeping in mind. I want to avoid hard coding to solve the specific flows and instead provide some sort of general scheduling. Brainstorming out loud here, what I have in my head at the moment is to possibly replace the concepts of specific scheduled operations with a concept of a "flow". Flows would be configured at the repo level OR at the plan level, and each flow includes
Existing configs would be migrated converting the options you see on the repo today into a flow that runs a check and then a prune as you say. Plans would be migrated to contain a flow that run a backup followed by a forget. The major caveat here is that this is complicated and somewhat violates Backrest's goals of simplicity / ease to setup. Which is much of why I've not pulled the trigger on this change yet. It does add a lot of flexibility, however and will become increasingly important as I implement multihost management solutions. Other open questions are ...
so it's a longer-term project. |
I'd love for this to be implemented as well. Before moving to backrest, my backup script looked like: restic backup /path
restic forget --prune --keep-within 1m
restic check I'd like to do the same thing with backrest but that doesn't really seem possible. It seems like it should be possible with command hooks but none of the environment variables that are set in the repository config are available in the hook. |
In addition to my long comment above, I just want to callout that backrest today will ...
So if you schedule a backup, prune, and check to run at the same time with cron schedules you will get the behavior that
|
Is your feature request related to a problem? Please describe.
As of now, scheduling does not allow to just specify that I want them to run after each other.
This is quite limiting, as I have to somehow time operations in my head and have to take into account the snapshot duration etc. with the cronjobs timings.
Additionally, in the repository options, it only allows to set the hours, which, if I have backup, prune, and check operations have to be seperated by minimum one hour.
Describe the solution you'd like
Add functionality to let the prune and check and snapshot be run on condition that another operation ran
snapshot --> Options: 1) Run after check, 2) Run after prune
prune --> Options 1) Run after snapshot, 2) Run after check
check --> Options 1) Run after snapshot, 2) Run after prune
This gives great additional functionality while not affecting anything else. Ultimately giving more flexibility
The text was updated successfully, but these errors were encountered: