Backup/Persist Data between Docker containers

#1

I am losing all my collections and data when I recreate a container. I am just testing backups.

Here are the commands I am using.

docker run --name cockpit -v [volumename]:/var/www/html -d -p [myIP]:8080:80 --restart always agentejo/cockpit

I then create some collections and enter some data. Then I stop and remove the container

docker container stop cockpit
docker container rm cockpit

Now I recreate the container and use the same volume as above (same command actually)

docker run --name cockpit -v [volumename]:/var/www/html -d -p [myIP]:8080:80 --restart always agentejo/cockpit

At this point i have to visit the install URL, log in as admin admin, and all collections, configs, and data are gone.

The volume folder does show all of the correct files on the host OS. The assets, config, install, storage, etc… folders are all there as well as various other php files and the like.

I must be missing some data somewhere. Any ideas???

Thanks

0 Likes