coreos/etcd — pull request #1514 by kelseyhightower (2014-10-30 01:36:51+00:00)
Title: etdctl: add import and export commands

These commands are provided to facilitate debugging issues by being able
to take a dump of the Etcd tree at an instance in time, and to quickly
rebuild the tree (for example, in a different environment (local developer
machine, automated testing etc))

export walks through the Etcd tree and prints what it finds in JSON format.
The walk may commence at a given key

import takes a JSON file (such as that created by the export command) and goes
about creating the relevant directories and keys in Etcd. Options are available
to parse the JSON file and print what actions would be performed and to force
overwriting of keys.