Replies: 1 comment
-
Hey, first off you're right that this is hard to do with backrest today. The proto definition for the repo struct can be found here: https://github.com/garethgeorge/backrest/blob/main/proto/v1/config.proto#L34-L45 . I think it's not entirely unreasonable to go about using this to script restic. The overall struct and utilities for the full set of variables available to hooks are defined here, https://github.com/garethgeorge/backrest/blob/main/internal/orchestrator/tasks/hookvars.go#L15-L29. This is a piece of code that's on my road map for some cleanup / much needed attention. Re: the specific issue of running commands in hooks, I think it could be reasonable for backrest to provide a way of formatting a restic command w/options from the repo given the command line arguments. It's a bit out of scope for something I have time to look at implementing at the moment, but if anyone were motivated to implement it I'd be happy to discuss approaches in an issue. Minimally a helper that returns the path to the restic binary (returned by this utility ) is something that could be added to the template function set. |
Beta Was this translation helpful? Give feedback.
-
I would like to sync a completed - and successful - backup to a secondary drive... one question was posted here: #438 seemingly without a final solution.
In my previous restic setup I was using
restic copy
to sync the repo to another. While not perfect, worked great and gave me an offsite backup that saved my bacon!I suppose I could explicitly write the full restic commands in a bash script, but I have a few gotchas...
Repo
struct is not fully documented... I discovered that{{ Repo.Uri }}
nicely returns the path that I can include on the command line with the-r
parameter. However, the rest of the options are somewhat opaque to me. Is there a way to get at the configured password, for example?Does this sound reasonable? Or is there something I'm missing? Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions