How can I back up and restore my Docker containers with their data when switching to Proxmox?
Asked by
TechSavant42
I'm looking to switch my server from Arch Linux to Proxmox, and I need some help figuring out how to back up all my Docker containers along with their data. I have a mini PC that's running multiple services and websites through Docker containers, and I want to migrate everything over to Proxmox without losing any of my hard work. I know that backing up containers isn't as straightforward as just copying files, given that containers are supposed to be ephemeral. So what's the best way to backup my containers and restore them on Proxmox? Ideally, I'm looking for a fast method since I don't have a lot of free time, but I'll take any method that works, even if it's time-consuming!
Answers
The distribution you use for hosting your Docker containers really doesn't affect the backup process. What matters is how you're persisting your dataโusing Docker volumes or bind mounts. Make sure you identify which type youโre using, and then back up that data to set up your containers on Proxmox with the same configurations. Just remember, Proxmox runs VMs and LXC containers, so youโll want to set up a VM for your Docker host.
Reply to this answer
Short answer: you don't actually back up containers in the traditional sense. Containers are designed to be ephemeral. However, you can back up and restore your configuration, like Docker Compose files or scripts, as well as any data stored in volumes or bind mounts. You can also save a container as an image, but to restore it, you'll be creating a new container using the same settings. It's a bit of a process, but not impossible!
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions