this post was submitted on 04 Nov 2023
80 points (92.6% liked)

Selfhosted

39216 readers
485 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

Maybe I state the obvious here but anyway:

Tonight I found a super comfi way to browse and restore data from Borg repositories. In vorta you can add any existing borg repository and mount the containing backups in a very functional GUI. Until now I somehow assumed you could only deal with backups created in vorta which is not true.

For context let me explain why I find that so useful: I am using a wonderful Borg / Borgmatic container from the borgmatic collective. It works super reliable. But for restoring files you have to mount the backup in the container and deal with the files inside the container. This can be difficult i.e. when looking for a specific file in a folder with a lot of files (like a foto collection where you accidentally deleted one file).

If any Borg users are out there: I would be interested what your workflows look like.

you are viewing a single comment's thread
view the rest of the comments
[–] witten 22 points 10 months ago* (last edited 10 months ago) (11 children)

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!

[–] [email protected] 2 points 10 months ago (1 children)

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 1 points 10 months 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!

load more comments (9 replies)