https://github.com/sammarks/docker-rancher-backup
Gets a list of all containers running on the current rancher host and periodically backs them up to Amazon S3.
https://github.com/sammarks/docker-rancher-backup
Last synced: about 1 year ago
JSON representation
Gets a list of all containers running on the current rancher host and periodically backs them up to Amazon S3.
- Host: GitHub
- URL: https://github.com/sammarks/docker-rancher-backup
- Owner: sammarks
- License: mit
- Created: 2016-04-19T02:03:22.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-19T03:14:55.000Z (about 10 years ago)
- Last Synced: 2024-10-19T09:19:56.492Z (over 1 year ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker Rancher Backup
Gets a list of all containers running on the current rancher host and
backs them up to Amazon S3 every three days. With the following environment
variables:
- `AWS_ACCESS_KEY`
- `AWS_SECRET_KEY`
- `AWS_BUCKET`
- `TAR_OPTS`
Here's a healthy default for the `TAR_OPTS` environment variable that
has some nice exclusions:
```
--exclude=backup --exclude=*/Cache* --exclude=*/cache* --exclude=*/Log* --exclude=*/log* --exclude=*/backup* --exclude=*/export* --exclude=*/plugins-osgi-cache* --exclude=*/tmp* --exclude=*.log --exclude=*/artifacts* --exclude=*/builds* --exclude=*/build-dir* --exclude=/var/lib/docker*
```
Here's a test run command:
```
docker run --rm --name=backup -d \
-e TAR_OPTS="--exclude=backup" \
-e AWS_ACCESS_KEY=access_key \
-e AWS_SECRET_KEY=secret_key \
-e AWS_BUCKET="bucket-name" \
docker-rancher-backup
```