Closed ThellraAK closed 1 year ago
There is a script to perform such actions in the borg dir (iirc, /matrix/backup-borg/cli/borgmatic)
@etkecc
Oh wow, you can actually just run borgmatic from in there
/matrix/backup-borg/bin/borgmatic borg key export
Gets you the repo key.
Something like this?
https://github.com/spantaleev/matrix-docker-ansible-deploy/compare/master...ThellraAK:matrix-docker-ansible-deploy:master
Yup, looks good, but I'd suggest to change a wording a bit to something like this: you don't have to backup repokey, because if remote repo is destroyed, you can't get encrypted backup from it anyway, but better to export it just in case
@etkecc Yeah, for some reason I had it in my head you always needed the repokey...
I think adding this in will just confuse people, I don't think it's ever needed at all.
Is your feature request related to a problem? Please describe.
There is no clear documentation on how to get your borg repokey
Describe the solution you'd like
Getting out the key is straightforward, you just need to take the docker exec command from
/etc/systemd/system/matrix-backup-borg.service
and replace thesh
line withsh -c "borgmatic borg key export"
Describe alternatives you've considered
Could try and figure out how to make a systemd unit thing like the one I copy/pasted the command from, instead of copying and editing it.
Additional context
Seems like there's two ways to do this, update the documentation with "Copy Paste this command and change the SH bit" or creating a new systemd service oneshot thing, I'm willing to do the first, or try the second.