Docker volume container which restores and backs-up data to various types of storage
10K+
Over 900 people downloaded this image within days of its creation, so I guess I have to say something :)
What this image does
Features
I'm using it under CoreOS, so this is a part of my unit file that shows how you could use it:
ExecStartPre=-/usr/bin/rm -rf ${DATA_DIR}
ExecStartPre=-/usr/bin/mkdir ${DATA_DIR}
ExecStart=/bin/bash -c ' \
/usr/bin/docker run \
-v ${DATA_DIR}:/var/backup \
--name=${CONTAINER_NAME} \
--rm \
-e AWS_ACCESS_KEY_ID=<ID> -e AWS_SECRET_ACCESS_KEY=<SECRET> \
--privileged \
yaronr\backup-volume-container s3://s3.amazonaws.com/<bucket_name>/backup 60'
60 is the quiet period. It's important to keep this value high enough, else you will be creating a lot of backups.
Backups are incremental, and can be encrypted. Underlying persistent stores include:
This image uses Duplicity for backup and restore. Go to the Duplicity docs to see more.
The way I use it, is to map the container's data dir to a host dir, and map host data/subdirs to relevant containers. You could also map it directly to your various docker containers without the host.
I prefer having the host as an intermediary, because it increases robustness and is a cleaner approach in my view.
I built this image for my own use, but the source code is available and I will be very to receive pull requests that enhance / improve this solution, as well as comments whether or not you find this useful and how you use it.
Content type
Image
Digest
sha256:faa772a96…
Size
50.9 MB
Last updated
over 9 years ago
docker pull yaronr/backup-volume-container