Replies: 1 comment
-
Hey, pretty interesting question! My recommendation would be to simply backup your backrest config. The config is expected to be self contained and contains your users, repo definitions, plans, etc. The BACKREST_DATA directory is where Backrest stores the operation log, the version of restic that it installs for you (which is GPG signature verified w/the restic maintainer's key), and command logs that are bundled in .tar archives. BACKREST_DATA isn't really intended to be portable or something that you backup. Instead I'd recommend relying on just restoring your config and having backrest reindex the snapshots in your repo on the machine you want to restore from. Backrest tracks most of the important metadata for restore operations in the snapshots themselves (through tags indicating the plan and backrest install that created the snapshot). tl;dr Personally, I just keep a copy of my config.json in my password manager as a secure note. Backrest will never break config version compatibility outside of a major version change (and will always maintain migrations for a few versions on either side) so backing up your config manually when adding or removing repos is enough. |
Beta Was this translation helpful? Give feedback.
-
So this question isn't about using backrest to backup data. This is about how to backup the config of backrest itself, for restoration in the future? It would be nice not to have to manually re-create the web login user, setup the repo, setup the backup set, etc.
I see in the readme there are two env variables,, BACKREST_CONFIG (a file) and BACKREST_DATA (a directory).
I'm using all the defaults for backrest, so is it sufficient to copy those two things, which default to:
$HOME/.config/backrest/config.json
$HOME/.local/share/backrest
Then, when restoring: re-install backrest, start the service, stop the backrest service, and replace those two things with the backup copies, then restart the service?
Beta Was this translation helpful? Give feedback.
All reactions