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.

  • sv-giampa@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months 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.