How can I backup a Docker-container with its data-volumes?

I’ve been using this Docker-image tutum/wordpress to demonstrate a WordPress website. Recently I found out that the image uses volumes for the MySQL-data.

So the problem is this: If I want to backup and restore the container I can try to commit an image, and then later delete the container, and create a new container from the committed image. But if I do that the volume gets deleted and all my data is gone.

There must be some simple way to backup my container plus its volume-data but I can’t find it anywhere.

16 Answers
16

Leave a Comment