etcd-backup

command module
v0.0.0-...-402c6be Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

README

etcd-backup

CircleCI Docker Repository on Quay

Tool for creating etcd backups and uploading them to AWS S3.

Getting project

Quickstart with docker

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 \
    -aws-s3-bucket bucket \
    -prefix cluster1 \
    -etcd-v3-endpoints http://172.17.0.1:2379 \
    -etcd-v2-datadir /var/lib/etcd
How to build
CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' .

Usage

Dependencies
  • etcdctl installed.
  • AWS S3 bucket.
  • AWS access and secret key with write permissions for this bucket.
Usage help
etcd-backup -help
Create V3 backup

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
Create V2 and V3 backup

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
Restore backup

To restore backup use following guide as example.

Future Development

  • Implement additional storage backends.

Contact

Contributing & Reporting Bugs

See CONTRIBUTING.md for details on submitting patches, the contribution workflow as well as reporting bugs.

License

PROJECT is under the Apache 2.0 license. See the LICENSE file for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL