Public | Automated Build

Last pushed: 2 days ago
Short Description
Create Backups of an etcd cluster on S3
Full Description

Create Backups of the etcd cluster on S3

Creating a backup

This command will create an object on s3 containing all the keys in etcd under /service

The target object is etcd.json

Example command

docker run --rm -e S3_BUCKET=pph_staging_etcdump -e AWS_ACCESS_KEY_ID="<somekey>" -e AWS_SECRET_ACCESS_KEY="<super secret>" -e AWS_DEFAULT_REGION="us-east-1" -e ETCD_HOST=etcd.stg.peopleperhour.com -e ETCD_PORT=2379 peopleperhour/etcd_backup backup

Restoring from backup

When you want to restore just hit the same with restore and it will restore the document from etcd

It will fetch the etcd.json file and import to etcd
Example command

docker run --rm -e S3_BUCKET=pph_staging_etcdump -e AWS_ACCESS_KEY_ID="<somekey>" -e AWS_SECRET_ACCESS_KEY="<super secret>" -e AWS_DEFAULT_REGION="us-east-1" -e ETCD_HOST=etcd.stg.peopleperhour.com -e ETCD_PORT=2379 peopleperhour/etcd_backup restore

Custom restore object

If you want to override the s3 object name just add the -e S3_OBJECT parameter

Example command

docker run --rm -e S3_OBJECT=my_cool_object -e S3_BUCKET=pph_staging_etcdump -e AWS_ACCESS_KEY_ID="<somekey>" -e AWS_SECRET_ACCESS_KEY="<super secret>" -e AWS_DEFAULT_REGION="us-east-1" -e ETCD_HOST=etcd.stg.peopleperhour.com -e ETCD_PORT=2379 peopleperhour/etcd_backup restore
Docker Pull Command
Owner
peopleperhour
Source Repository

Comments (0)