Hey there,
I’m in need of a bit of wisdom here:
I recently got myself a shiny new Vserver and have it running exclusively with docker containers that use regular volumes.

Now: how would I back this thing up? I mean, I have read a lot about borg for example, but I’m not sure how to do it the right way:
Do I just copy / to a repo and fiddle the data back in place if stuff goes wrong, or would it be wiser to backup the volumes, do a docker save and export the images to a folder and then send that to the storage box?

Since docker should stop the containers to prevent data inconsistency during a backup: How do I tell Borg to do that? I’ve seen several approaches (Borg Dockerized with some sort of access to docker’s .sock, Borg setup on the host, and some even wilder approaches).

Since Backups aren’t something you can “try again” once you need them, I’d rather have a solution that works.

Norgur
creator
link
fedilink
01Y

For everyone here: I decided on restic and wrote a little script that backs up basically all docker volumes after stopping all containers. Now I just gotta collect and save all relevant docker compose scripts somewhere (and incorporate all the little changes I made to the containers after deployment)

earthling
link
fedilink
11Y

Restic is awesome and has been rock solid for me for a few years now. Good choice.

@aesir@lemmy.world
link
fedilink
English
11Y

In all the cases for me is sufficient to backup the folder which host the volume for persistent data of each container. I typically do not care to stop and reload containers but nothing prevents you to do so in the backup script. Indeed if a database is concerned the best way is to create a dump and backup that one file. Considering tools, Borg and restic are both great. I am moving progressively from Borg to restic+rclone to exploit free cloud services.

Isaac
link
fedilink
11Y

I don’t know a lot about vserver or borg, but where do your volumes live? On the same machine? Different hard drive?

I’ve been using Kopia which runs in a docker container and backs up my data to B2. It does daily, weekly, monthly, and yearly copies. You can browse your backups on a file level inside the UI and redownload just what you want or do a full restore. It’s all encrypted in B2 as well. I’ve had to use it to download backups of corrupted SQLite files and I haven’t had a single issue with it yet.

Create a post

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!

  • 1 user online
  • 30 users / day
  • 79 users / week
  • 215 users / month
  • 844 users / 6 months
  • 1 subscriber
  • 1.42K Posts
  • 8.13K Comments
  • Modlog