- Notifications
You must be signed in to change notification settings - Fork0
Backup docker volumes to S3
License
NotificationsYou must be signed in to change notification settings
adamkoro/docker-volume-backup-s3
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Simple docker volume backup to S3.
Create tar.gz file from docker volume and upload it to S3.
This image is only for backup. It doesn't have any restore functionality.
Dockerhub:https://hub.docker.com/r/adamkoro/docker-volume-backup
- latest: Latest builded image
- Commit hashes: If you need you can use specific image via commit hash
- Tags: These are the version of the script
Variable | Description | Default |
---|---|---|
S3_BUCKET | S3 bucket name | backup |
S3_ENDPOINT | S3 endpoint | empty |
S3_ACCESS_KEY | S3 access key | empty |
S3_SECRET_KEY | S3 secret key | empty |
S3_REGION | S3 region | empty |
S3_SSL | S3 ssl usage | true |
BACKUP_NAME | Name of the tar.gz file | backup |
NUMBER_OF_BACKUPS | Number of the files in keep | 2 |
IMPORTANT: You need to mount volume with backup files to/backup
directory. Make sure mountedread-only
mode.
Backup file name:BACKUP_NAME_YYYY-MM-DD-HH-MM-SS.tar.gz
that's why you have to setBACKUP_NAME
environment variable.
docker run --rm -it -v /backup/:/backup -e S3_BUCKET=backup -e S3_ENDPOINT=minio.server.local -e S3_ACCESS_KEY=test -e S3_SECRET_KEY=test -e S3_REGION=home -e S3_SSL=true -e BACKUP_NAME=test-backup docker.io/adamkoro/docker-volume-backup:latest
version:'3.7'services:backup:image:docker.io/adamkoro/docker-volume-backup:latestvolumes: -docker-tmp-backup/:/backup:roenvironment: -S3_BUCKET=backup -S3_ENDPOINT=minio.server.local -S3_ACCESS_KEY=test -S3_SECRET_KEY=test -S3_REGION=home -S3_SSL=true -BACKUP_NAME=backupvolumes:docker-tmp-backup:
About
Backup docker volumes to S3
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.