I'm trying to figure out how to back up all my Docker containers and their data from an Alpine virtual machine on Proxmox, and then restore everything to a Docker setup on an Ubuntu Server virtual machine within Proxmox. What are the best methods or practices to ensure that all necessary data is preserved and migrated properly?
3 Answers
Backing up containers isn't always essential unless you've made changes after they started. The main thing you should focus on is backing up any mutable data. If you're using bind mounts, it's straightforward—just back up your data directories, like /opt/docker/[container name]. When I switch systems, I simply move those directories, set up a fresh Portainer, and redeploy my stacks without hassle.
You could directly move the data from the Alpine VM to the Ubuntu VM and also transfer the compose files. After that, just recreate your stacks on the new VM. The usual backup function in Proxmox, which is for the entire VM, might not be necessary since you'd want to specifically migrate your application data instead.
I had a similar issue and received excellent guidance from a user named Claude. He gave me detailed steps that worked perfectly and helped me figure out my volume mounts and everything else. Just remember to be careful with the paths, user settings, and permissions during the process.

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