this post was submitted on 25 Oct 2023
2 points (100.0% liked)

Self-Hosted Main

515 readers
1 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.

For Example

We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.

Useful Lists

founded 1 year ago
MODERATORS
 

โ€‹

Hey - so I am just getting started with self hosting and docker containers.

I have found that I can backup all my containers to this location easily via script https://hub.docker.com/repository/docker

My largest container compressed size in my private repository is 3GB.

I was wondering if backing up to a hub.docker private repository is okay and if there is going to be cost/limitations to doing that?

What are you using for backing up your containers? I noticed people often expressing importance of backups but then not sharing how they are doing their backups and their backup setup.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] sv-giampa@alien.top 1 points 1 year ago

No container backups, just volume backups.

When you run a program on your PC, say a CAD or an IDE, you won't backup the software itself, but just data of your projects. The same is for containers. A container is the software, the volumes are your project data. You should store all the configuration of your container (e.g. config files, yaml files, databases directories, deployment files,etc. etc.) in one or more volumes that are persisted on your disk. By the way, the container lose all files not stored in volumes each time your server reboots, so the volume itself is a form of backups between power-ons.

Backing up containers is not a practice. It is not needed, it must not be done, never. Sometimes you want change the internal environment of your container, and in that case you want create/commit an image to restore that environment. This practice is more correctly called 'image creation' whose purpose is clearly not backing up something.

In ordet to recovery from some sort of disaster, you should backup your volumes and that's all.