How are you managing backups of your containers? What about Backups of Containers to https://hub.docker.com/repository/docker
sv-giampa @ sv-giampa @alien.top BOT Posts 0Comments 2Joined 2 yr. ago
sv-giampa @ sv-giampa @alien.top
BOT
Posts
0
Comments
2
Joined
2 yr. 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.