@@ -275,16 +275,16 @@ that is not currently used by an etcd process. Taking the snapshot will
275
275
not affect the performance of the member.
276
276
277
277
Below is an example for taking a snapshot of the keyspace served by
278
- ` $ENDPOINT ` to the file ` snapshotdb ` :
278
+ ` $ENDPOINT ` to the file ` snapshot.db ` :
279
279
280
280
``` shell
281
- ETCDCTL_API=3 etcdctl --endpoints $ENDPOINT snapshot save snapshotdb
281
+ ETCDCTL_API=3 etcdctl --endpoints $ENDPOINT snapshot save snapshot.db
282
282
```
283
283
284
284
Verify the snapshot:
285
285
286
286
``` shell
287
- ETCDCTL_API=3 etcdctl --write-out=table snapshot status snapshotdb
287
+ ETCDCTL_API=3 etcdctl --write-out=table snapshot status snapshot.db
288
288
```
289
289
290
290
``` console
@@ -343,19 +343,25 @@ employed to recover the data of a failed cluster.
343
343
Before starting the restore operation, a snapshot file must be present. It can
344
344
either be a snapshot file from a previous backup operation, or from a remaining
345
345
[ data directory] ( https://etcd.io/docs/current/op-guide/configuration/#--data-dir ) .
346
+
346
347
Here is an example:
347
348
348
349
``` shell
349
- ETCDCTL_API=3 etcdctl --endpoints 10.2.0.9:2379 snapshot restore snapshotdb
350
+ ETCDCTL_API=3 etcdctl --endpoints 10.2.0.9:2379 snapshot restore snapshot.db
350
351
```
351
- Another example for restoring using etcdctl options:
352
+
353
+ Another example for restoring using ` etcdctl ` options:
354
+
352
355
``` shell
353
- ETCDCTL_API=3 etcdctl snapshot restore --data-dir < data-dir-location> snapshotdb
356
+ ETCDCTL_API=3 etcdctl --data-dir < data-dir-location> snapshot restore snapshot.db
354
357
```
355
- Yet another example would be to first export the environment variable
358
+ where ` <data-dir-location> ` is a directory that will be created during the restore process.
359
+
360
+ Yet another example would be to first export the ` ETCDCTL_API ` environment variable:
361
+
356
362
``` shell
357
363
export ETCDCTL_API=3
358
- etcdctl snapshot restore --data-dir < data-dir-location> snapshotdb
364
+ etcdctl --data-dir < data-dir-location> snapshot restore snapshot.db
359
365
```
360
366
361
367
For more information and examples on restoring a cluster from a snapshot file, see
0 commit comments