Volume gone after Duplicate/Edit

Hi,

I edited a container with the Dupicate/Edit function (just changed the restart policy to always). After the duplicated container was up and runing the volume used in the container was reset and all the files created in the old volume are gone. I unchecked “Always pull the image” in the Duplicat/Edit dialog.

A find . -name $filename in /var/lib/docker/volumes for a known $filename in the old volume did not bring up a result.

Does portainer delete dangling volumes after recreating the container? Is there a way to restore the old volume?

Portainer version in use is 1.24.1

Thanks for your help.
ChD

Unless you have a volume that stores persistent data, you run the risk of your data being lost. Can you tell me more about how you originally deployed the container? Was it via a docker-compose in Portainer stacks or did you do it via a docker-compose up -d command? If it was either of those, can you share the stack/compose file so I can take a look?

Thanks,
David (Staff)

1 Like

Hi,

thanks for your reply. I rechecked my creation of the container and apparently I forgot to add the persistent volume to it. So all the data was just held in the overlays.

As far as I can tell those get wiped after a container is removed so no chance to get the data back.

ChD