Docker volume backups

It is important to remember that while your containers are immutable, the data inside your volumes is mutable. It changes, while the items inside your Docker containers do not. For this reason, you need to make sure that you are backing up your volumes in some manner.

Volumes are stored on the system at /var/lib/docker/volumes/.

The key to remember here is that the volumes are not named the way you named them in this directory. They are given unique hash values, so understanding what content is in them can be confusing if you are just looking at their name. If you are looking at managing volumes at this point, I would highly recommend this image from the Docker Hub: https://hub.docker.com/r/cpuguy83/docker-volumes/.

This container (once built) will allow you to list volumes as well as export them into a tarred up file.

Docker volume backups
Docker volume backups
Docker volume backups
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset