Git Product home page Git Product logo

etcd-backup's Introduction

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.

etcd-backup's People

Contributors

calvix avatar r7vme avatar pipo02mix avatar ferrandinand avatar marians avatar corest avatar

Watchers

sgcclh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.