Docker image for backup to Amazon S3.
926
Docker image for backup to Amazon S3.
/srcAWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables/root/.awsThen, run container with default command to start crond.
If you want to sync immediately, specify sh /sync.sh to command.
| Key | Default Value | Description |
|---|---|---|
| TZ | UTC | |
| SCHEDULE | Required | It should be a Crontab schedule format. |
| S3_URL | Required | |
| SYNC_OPTIONS | None | See AWS CLI Command Reference. |
| INCLUDE_FILES EXCLUDE_FILES | None | Short hand to --include and --exclude options. It should be a comma separated string. |
docker-compose.yml exampleIn this example, foo-volume is backed up to s3://backup/foo daily at 21:00 JST.
version: '3'
services:
backup-s3:
image: hoto17296/backup-s3
environment:
TZ: Asia/Tokyo
SCHEDULE: '0 21 * * *'
AWS_ACCESS_KEY_ID: XXXXXXXXXXXXXXXXXXXX
AWS_SECRET_ACCESS_KEY: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
S3_URL: s3://backup/foo
SYNC_OPTIONS: --delete
EXCLUDE_FILES: '*.git/*, *.ipynb_checkpoints/*'
volumes:
- foo-volume:/src
Content type
Image
Digest
Size
52.3 MB
Last updated
about 7 years ago
docker pull hoto17296/backup-s3