Is there a way to have an ssh remote without borg installed on the target?
Comment on What I just learned about restoring BorgBackups
witten@lemmy.world 1 year ago
borgmatic dev here. First of all, if Vorta is working well for you to recover files, then by all means use Vorta! Right tool for the job and all. Having said that, a couple of thoughts on using borgmatic in Docker and recovering files:
borgmatic has a search feature that makes finding a particular file in an archive or across archives pretty easy. So that might be step one in restoring an accidentally deleted file.
Once you’ve found the file and archive to restore, you can either use borgmatic extract
or borgmatic mount
. With extract
, you copy one or more files out of a backup archives. The challenge though is that with borgmatic in a container, by default there’s not an easy way to copy those files into their original locations. However I think the “fix” is to mount your source volumes as read-write instead of (the documented) read-only. That way you can easily copy extracted files back to where they belong.
As for borgmatic mount
, you’ve got a similar challenge and fix. You can presumably mount backup archives (or a whole repository) within the container, but then you need to copy your recovered files out of that mount into their original source volumes. So that probably also means those volumes need to be mounted read-write.
Let me know if you have any questions!
shadowbert@kbin.social 1 year ago
witten@lemmy.world 1 year ago
Nope! Borg always requires Borg on the remote side. It’s Borg’s biggest strength and weakness versus competing backup systems IMO. Strength, because it can do pretty smart stuff with its own code running on both sides. Weakness, because it means it doesn’t work natively with cloud object storage like S3. It’s a tradeoff like anything else.
shadowbert@kbin.social 1 year ago
Makes sense - compromises like you say.
So in the context of unraid, do I just run the borgmatic container on both ends? Or should there be a specific 'server' one?
witten@lemmy.world 1 year ago
I’m not super familiar with Unraid, but yeah, the borgserver image sounds like it’d work for this… You don’t need borgmatic on the server side unless you want it there to make running Borg commands easier.
raldone01@lemmy.world 1 year ago
You could always sftp mount the repo if you cant install borg but have sftp support. Probably won’t be as efficient though.
Carunga@feddit.de 1 year ago
Thanks for your answer and taking the time! Borgmatic search I did not know. That is an amazing tool. You are right about the mounting. My way of dealing with that is a NFS share I mount RW so I can restore to that and than copy whereever. This might it be ideal for very large restores though. Initially I thought I could borgmount to the NFS share and then access the filesystem via NFS. But this does nof work I suppose as Borg only lives inside the container. Generally I do like having Borg and Borgmatic containerized as almost everything else I selfhost but it adds complexity restoring. Anyways great project, it is just so powerful and in many ways elegant. Really enjoy using it!
witten@lemmy.world 1 year ago
Glad to hear it’s (mostly) working out for you! I know you came here looking for best practices with restores, but if you end up coming up with anything yourself, feel free to comment on that Docker borgmatic ticket with requests or ideas. I use the container myself on some systems for the same reasons you do, and I also wouldn’t mind smoother restores!