Tool for creating etcd backups and uploading them to AWS S3.
Create etcd V2 and V3 backup and upload to S3.
docker run --rm \
-e ETCDBACKUP_AWS_ACCESS_KEY=XXX \
-e ETCDBACKUP_AWS_SECRET_KEY=YYY \
-e ETCDBACKUP_PASSPHRASE=ZZZ \
-v /var/lib/etcd:/var/lib/etcd \
quay.io/giantswarm/etcd-backup \
-provider aws \
-aws-s3-region eu-west-1 \
-aws-s3-bucket bucket \
-prefix cluster1 \
-etcd-v3-endpoints http://172.17.0.1:2379 \
-etcd-v2-datadir /var/lib/etcd
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' .
etcdctl
installed.- AWS S3 bucket.
- AWS access and secret key with write permissions for this bucket.
etcd-backup -help
By default tool creates only V3 backup and uploads file to AWS S3.
export ETCDBACKUP_AWS_ACCESS_KEY=XXX
export ETCDBACKUP_AWS_SECRET_KEY=YYY
export ETCDBACKUP_PASSPHRASE=ZZZ
etcd-backup -aws-s3-bucket bucket -prefix cluster1
To create both V2 and V3 make sure etcd data directory accessible locally.
etcd-backup -aws-s3-bucket $BUCKET_NAME -prefix $CLUSTER_NAME -etcd-v2-datadir /var/lib/etcd
To restore backup use following guide as example.
- Implement additional storage backends.
- Mailing list: giantswarm
- IRC: #giantswarm on freenode.org
- Bugs: issues
See CONTRIBUTING.md for details on submitting patches, the contribution workflow as well as reporting bugs.
PROJECT is under the Apache 2.0 license. See the LICENSE file for details.