I'm transitioning from an ESXi setup with Docker running on separate Linux VMs for each container. I back up each VM using Veeam, which makes recovery straightforward. Now, I'm moving to Proxmox where I plan to host multiple containers in a single Linux VM. While Proxmox will back up the entire VM, I'm looking for the best methods to back up each container individually and their data. I want an efficient way to restore specific containers without restoring the whole VM. Any recommendations?
6 Answers
Right! Remember, containers are designed to be transient. Backing them up isn't really a practice to follow in the container world.
Instead of backing up the containers directly, focus on your configuration files and volumes. Using Docker Compose to define your environments is a smart move. Just back those files up along with any persistent data volumes. Remember, containers are designed to be ephemeral, so treat them as disposable resources and rely on your setup files for recovery.
If your data is essential, bind mount it to the containers. You can transfer the data and configuration to the new setup and start fresh with new images. If you aren't using bind mounts, you might be complicating things too much.
Usually, you can save images to a private registry. If you handle persistent data properly with bind mounts inside the VM, that helps maintain data integrity even after containers are destroyed. For advanced setups, consider using a container orchestration tool.
You really shouldn’t waste time backing up actual containers. They’re meant to be temporary. Instead, make sure you save your Dockerfiles and orchestration setup in Git. If you've got stateful containers, back up their volumes, but generally, think of containers as cattle, not pets. This way, if something breaks, you can redeploy quickly.
Exactly! And for VMs, you might not even need to back them up. Infrastructure as code tools like Terraform can rebuild them for you. Just focus on the data volumes that need to be persistent.
While many people say don’t worry about backing up containers, it’s worth knowing that Proxmox has a great backup feature that can let you restore specific files if needed. That's pretty slick if you end up needing a particular file restored.

That’s a solid plan! Just keep in mind that simple file backups don’t always cover complex applications. For databases, I’d suggest using application-aware backups like `pg_dump` for PostgreSQL. It's usually safer and ensures you get consistent data.