Closed rikroe closed 1 month ago
hey, thanks for the detailed request. I think this is a good idea and makes sense for a number of use cases (including a couple I have myself).
No ETA to provide re: implementation, but retrying backoff for hook failures is something I'll aim to get to.
Starting to prototype this in https://github.com/garethgeorge/backrest/pull/428
Merged in retry support, will go out with next release.
Thank you so much! Didn't find the time to figure out compiling myself and testing the PR but will check once released!
Note: if you have a question or want discussion please post in the discussions area.
Is your feature request related to a problem? Please describe. I use backrest to backup an external SSD on a laptop. There is no guarantee that the SSD is plugged in/mounted. I want backrest to try and run a Backup at least once a day, if the SSD is available.
To check if the SSD is available, I use the following hook.
This works as a backup task will get cancelled if the SSD is not available. However the next task will then be scheduled based on the timestamp of the last cancelled run instead of the last successful run.
Describe the solution you'd like I would like backrest to retry a cancelled operation (this probably should include a delay).
Ideas how this could be implemented (not having thought it through completely):
ON_ERROR_RETRY
)CONDITION_SNAPSHOT_START
hook. This probably requires some addition to the template variables?Additional context While I could partly deal with this issue by reducing the backup schedule do 1 hour intervals, this would lead to a lot of unneeded backup tasks (some cancelled, some actually creating snapshots).