Create back-ups of docker volumes

There exist many scripts that create a backup of your docker volumes to for example your local machine. One example can be found at

https://github.com/loomchild/volume-backup

and another one at

https://github.com/JorgenRingen/docker-backup-volume .

The main difference between the two approaches is that the first project runs the backup script from within the container and the second spawns a container from within the script. The main benefits of the second approach are:

  • No need to build a custom image containing the script as entrypoint
  • The script controls the conditions under which the container is supposed to run

A revised version of the second project can be found in the forked github repository

https://github.com/verhoek/docker-backup-volume .

With the forked version, it is possible to create back-ups using docker-machine from a remote server to your local machine.