8
Moving docker image data between VMs
(lemmy.ml)
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Great. There's two volumes there -
firefly_iii_upload
&firefly_iii_db
.You'll definitely want to
docker compose down
first (to ensure the database is not being updated), then:and
Then copy those two .tar files to the new VM. Then create the new empty volumes with:
And untar your data into the volumes:
Then make sure you've manually brought over the compose file and those two .env files, and you should be able to docker compose up and be in business again. Good choice with Proxmox in my opinion.
@thirdBreakfast @trilobite 🤔
Interestingly, handling of volumes with podman is much more easier:
podman volume export myvol --output myvol.tar
podman volume import myvol myvol.tar
https://docs.podman.io/en/latest/markdown/podman-volume-export.1.html
I also checked the docker volume client documentation and there is no export command available like for podman.
https://docs.docker.com/reference/cli/docker/volume/
Interestingly, I did something similar with Linkwarden where I installed the datasets in /home/user/linkwarden/data. The dam thing caused my VM to run out of space because it started downloading pages for the 4000 bookmarks I had. It went into crisis mode so I stopped it. I then created a dataset on my Truenas Scale machine and NFS exported to the VM on the same server. I simply cp -R to the new NFS mountpoint, edited the yml file with the new paths and voila! It seems to be working. I know that some docker container don't like working off NFS share so we'll see. I wonder ho well this will work when the VM is on a different machine as the there is a network cable, a switch, etc. in between. If for any reason the nas goes down, the docker containers on the Proxmox VM will be crying as they'll lose the link to their volumes? Can anything be done about this? I guess it can never be as risilient as having VM and has on the same machine.
I run nearly all my Docker workloads with their data just in the home directory of the VM (or LXC actually since that's how I roll) I'm running them in, but a few have data on my separate NAS via and NFS share - so through a switch etc with no problems - just slowish.