Docker volume Mysql: backup restore


A simplistic example of docker volumes and mysql, back up and restore data using volumes. Use those back ups independently of the containers. This is a simplistic example because it does a little introduction and example of the flexibility and usage of volumes of docker.



The code for this example is here: git hub repo

Forever learning

During the creation of this application I learnt about:

  • Docker
  • Extending from Mysql
  • Get data from a volume dump, and set it in a data dump.
  • Independent creation of volumes, assignation of those volumes to the container we will run.


I believe docker volumes is great, and shows a bit the power of docker. Docker offers so many other options with volumes and this is just one of the things you can do with them.

Also is meantioned that this is a "raw" solution meaning that has no other abstraction like docker compose or minikube, and it is mentioned that such abstractions in many cases can also help with maintenability and clarity of what is being created.


Did you like this post?

Share it in twitter or follow me!