From 406bb6749e624e04e776f05686341845edc42c56 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Fri, 28 Aug 2015 20:57:12 -0700 Subject: [PATCH] doc: add 0.4.9 to 2.2 migration guide --- Documentation/04_to_2_snapshot_migration.md | 31 +++++++++++++++++++++ README.md | 4 +-- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 Documentation/04_to_2_snapshot_migration.md diff --git a/Documentation/04_to_2_snapshot_migration.md b/Documentation/04_to_2_snapshot_migration.md new file mode 100644 index 000000000..4608f9ffd --- /dev/null +++ b/Documentation/04_to_2_snapshot_migration.md @@ -0,0 +1,31 @@ +## Snapshot Migration + +You can migrate a snapshot of your data from a v0.4.9+ cluster into a new etcd 2.2 cluster using a snapshot migration. After snapshot migration, the etcd indexes of your data will change. Many etcd applications rely on these indexes to behave correctly. This operation should only be done while all etcd applications are stopped. + +To get started get the newest data snapshot from the 0.4.9+ cluster: + +``` +curl http://cluster.example.com:4001/v2/migration/snapshot > backup.snap +``` + +Now, import the snapshot into your new cluster: + +``` +etcdctl --endpoint new_cluster.example.com import --snap backup.snap +``` + +If you have a large amount of data, you can specify more concurrent works to copy data in parallel by using `-c` flag. +If you have hidden keys to copy, you can use `--hidden` flag to specify. + +And the data will quickly copy into the new cluster: + +``` +entering dir: / +entering dir: /foo +entering dir: /foo/bar +copying key: /foo/bar/1 1 +entering dir: / +entering dir: /foo2 +entering dir: /foo2/bar2 +copying key: /foo2/bar2/2 2 +``` diff --git a/README.md b/README.md index 39501f451..b35d09c6b 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ Now it's time to dig into the full etcd API and other guides. - Find [language bindings and tools][libraries-and-tools]. - Use TLS to [secure an etcd cluster][security]. - [Tune etcd][tuning]. -- [Upgrade from 0.4.6 to 2.0.0][upgrade]. +- [Upgrade from 0.4.9+ to 2.2.0][upgrade]. [api]: ./Documentation/api.md [clustering]: ./Documentation/clustering.md @@ -86,7 +86,7 @@ Now it's time to dig into the full etcd API and other guides. [libraries-and-tools]: ./Documentation/libraries-and-tools.md [security]: ./Documentation/security.md [tuning]: ./Documentation/tuning.md -[upgrade]: ./tools/etcd-migrate/README.md +[upgrade]: ./Documentation/04_to_2_snapshot_migration.md ## Contact