Problem:
I'd like to create regular backups of a docker volume used by a running docker container.
Partial solutions:
If I shut down the container using the volume, I found these solutions:
Save to .tar like:
docker run --rm -v some_volume:/volume -v /tmp:/backup alpine tar -cjf /backup/some_archive.tar.bz2 -C /volume ./
(Source: https://medium.com/@loomchild/backup-restore-docker-named-volumes-350397b8e362)Stackoverflow solution:
How can I backup a Docker-container with its data-volumes?
Question:
Using either docker or also docker-compose, how do I backup a volume, without any downtime of the app container using the volume?