Skip to content

Repository files navigation

DockerVolumeBackup

VersionDocker PullsDocker BuildLicense

Docker Image

On Docker Hub: https://hub.docker.com/r/pants1/docker-volume-backup
Image: pants1/docker-volume-backup

Configuration

The host directory /var/lib/docker/volumes/ must be mounted to the container directory /HostVolumeData.
This is where DockerVolumeBackup looks for volume data.

Provide the service with the following environment variables:

# S3 CredentialsS3_Endpoint=https://example.com/
S3_Region=us-east
S3_Access_Key=abc
S3_Secret_Key=123
S3_Bucket_Name=bucky
S3_Directory_Name=backups
# List of volumes to backup, separated# by commasVolumes_To_Backup=db,web,api
# Interval for taking a backup snapshot (every x hours)# Interval for which snapshot to keep permanently (every x snapshots)# In this example, every 24 hours a permanent backup is saved,# whilst every two hours a snapshot is overwritten.snapshot_interval=2
backup_interval=12
backup_on_startup=yes
# Set what severity of log message to print to shellLog_Level=INFO
# Disables the appDisabled=no

You can find the exact names of the volumes to backup by listing your volumes with docker volume ls.

Using in docker-compose:

backup:
image: pants1/docker-volume-backupenv_file:
- .envvolumes:
- /var/lib/docker/volumes/:/HostVolumeData

Todo:

  • Add testing
  • Add old backup cleanup
  • Clean up S3 library and main file procedures

License

This project is licensed under the GNU GPLv3.
This license is copy-left and conducive to free, open-source software.

Project license: https://github.com/vardy/DockerVolumeBackup/blob/master/LICENSE
License details: https://choosealicense.com/licenses/gpl-3.0/#

About

Automatically backup docker volumes to AWS S3 (or S3 compatible services)

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages