Sign inSign up

tomzo/consul-backup

By tomzo

Updated almost 11 years ago

Small image to run consul backup and restore

Image
1

3.6K

tomzo/consul-backup repository overview

Consul backup

Consul Backup and Restore tool.

This will use consul-api (Go library) to recursively backup and restore all your key/value pairs.

Usage:

consul-backup [-i IP:PORT] [-t TOKEN] [--aclbackup] [--aclbackupfile ACLBACKUPFILE] [--restore] consul-backup -h | --help consul-backup --version

Options: -h --help Show this screen. --version Show version. -i, --address=IP:PORT The HTTP endpoint of Consul [default: 127.0.0.1:8500]. -t, --token=TOKEN An ACL Token with proper permissions in Consul [default: ]. -a, --aclbackup Backup ACLs, does nothing in restore mode. ACL restore not available at this time. -b, --aclbackupfile=ACLBACKUPFILE ACL Backup Filename [default: acl.bkp]. -r, --restore Activate restore mode

Development

You need to set up your Go environment and "go get github.com/hashicorp/consul/api" and "go get github.com/docopt/docopt-go"

a "go build" will generate executable named "consul-backup"

Docker image

This app is Dockerized.

To build image

docker build -t consul-backup .

To backup consul-kv simply run

docker run --rm -v /tmp:/tmp consul-backup app -i <CONSUL-URL>:8500 /tmp/backup_consul

To restore consul-kv simply run

docker run --rm -v /tmp:/tmp consul-backup app -i <CONSUL-URL>:8500 --restore /tmp/backup_consul

Tag summary

Content type

Image

Digest

sha256:e813baa18

Size

249.2 MB

Last updated

almost 11 years ago

docker pull tomzo/consul-backup