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!
2 Answers
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!
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.

Related Questions
How To Get Your Domain Unblocked From Facebook
How To Find A String In a Directory of Files Using Linux