<commit_before># etcdbk
[![](https://badge.imagelayers.io/christianbladescb/etcdbk:latest.svg)](https://imagelayers.io/?images=christianbladescb/etcdbk:latest 'Get your own badge on imagelayers.io')

[![](http://dockeri.co/image/christianbladescb/etcdbk)](https://registry.hub.docker.com/u/christianbladescb/etcdbk)

Etcdbk is a tool for backing up the values in a live etcd cluster. 

Etcdbk generates a tarball (tar.gz) with paths matching the keys in your etcd cluster. Etcdbk uses the etcd API instead of direct access to the etcd data directory, thus allowing backups to be generated on machines remote to the target cluster, or from within application containers.

**Caveat:** Because etcdbk only adds keys to resulting artifact, etcd paths that have no keys will be lost.

## Installation

```shell
$ go get github.com/christian-blades-cb/etcdbk
```

Alternatively, a docker image is available at [christianbladescb/etcdbk](https://registry.hub.docker.com/u/christianbladescb/etcdbk/), or can be built via the `build.sh` script in the root of this repository.

## Usage

```
Usage:
  etcdbk [OPTIONS]

Application Options:
  -e, --etcd-hosts=   etcd machines (http://127.0.0.1:2379) [$ETCD_HOSTS]
  -n, --cluster-name= Cluster name to use in naming the file in the S3 Bucket (etcd-cluster) [$CLUSTER_NAME]
  -o, --outfile=      Where to write the resulting tarball. '-' for STDOUT [$OUTFILE]
      --aws-access=
      --aws-secret=
      --s3-endpoint=  AWS S3 endpoint. See http://goo.gl/OG2Nkv (https://s3.amazonaws.com) [$AWS_S3_ENDPOINT]
      --aws-bucket=

Help Options:
  -h, --help          Show this help message<commit_msg>update usage<commit_after># etcdbk
[![](https://badge.imagelayers.io/christianbladescb/etcdbk:latest.svg)](https://imagelayers.io/?images=christianbladescb/etcdbk:latest 'Get your own badge on imagelayers.io')

[![](http://dockeri.co/image/christianbladescb/etcdbk)](https://registry.hub.docker.com/u/christianbladescb/etcdbk)

Etcdbk is a tool for backing up the values in a live etcd cluster. 

Etcdbk generates a tarball (tar.gz) with paths matching the keys in your etcd cluster. Etcdbk uses the etcd API instead of direct access to the etcd data directory, thus allowing backups to be generated on machines remote to the target cluster, or from within application containers.

**Caveat:** Because etcdbk only adds keys to resulting artifact, etcd paths that have no keys will be lost.

## Installation

```shell
$ go get github.com/christian-blades-cb/etcdbk
```

Alternatively, a docker image is available at [christianbladescb/etcdbk](https://registry.hub.docker.com/u/christianbladescb/etcdbk/), or can be built via the `build.sh` script in the root of this repository.

## Usage

```
Usage:
  etcdbk [OPTIONS]

Application Options:
  -e, --etcd-hosts=   etcd machines (http://127.0.0.1:2379) [$ETCD_HOSTS]
  -o, --outfile=      Where to write the resulting tarball. '-' for STDOUT
                      [$OUTFILE]
  -n, --cluster-name= Cluster name to use in naming the file in the S3 Bucket
                      (etcd-cluster) [$CLUSTER_NAME]
      --aws-access=   Access key of an IAM user with write access to the given
                      bucket [$AWS_ACCESS_KEY_ID]
      --aws-secret=   Secret key of an IAM user with write access to the given
                      bucket [$AWS_SECRET_ACCESS_KEY]
      --s3-endpoint=  AWS S3 endpoint. See http://goo.gl/OG2Nkv
                      (https://s3.amazonaws.com) [$AWS_S3_ENDPOINT]
      --aws-bucket=   Bucket in which to place the archive. [$AWS_S3_BUCKET]
      --debug         verbose logging

Help Options:
  -h, --help          Show this help message
{'fraction_non_alphanumeric': 0.11086837793555435, 'fraction_numerical': 0.009011469142545057, 'mean_word_length': 3.3607142857142858, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1385145', 'n_tokens_mistral': 1258, 'n_tokens_neox': 1162, 'n_words': 385}