@@ -495,12 +495,12 @@ etcd 支持内置快照。快照可以从使用 `etcdctl snapshot save` 命令
495
495
496
496
<!--
497
497
Below is an example for taking a snapshot of the keyspace served by
498
- `$ENDPOINT` to the file `snapshotdb `:
498
+ `$ENDPOINT` to the file `snapshot.db `:
499
499
-->
500
- 下面是一个示例,用于获取 ` $ENDPOINT ` 所提供的键空间的快照到文件 ` snapshotdb ` :
500
+ 下面是一个示例,用于获取 ` $ENDPOINT ` 所提供的键空间的快照到文件 ` snapshot.db ` :
501
501
502
502
``` shell
503
- ETCDCTL_API=3 etcdctl --endpoints $ENDPOINT snapshot save snapshotdb
503
+ ETCDCTL_API=3 etcdctl --endpoints $ENDPOINT snapshot save snapshot.db
504
504
```
505
505
506
506
<!--
@@ -509,7 +509,7 @@ Verify the snapshot:
509
509
验证快照:
510
510
511
511
``` shell
512
- ETCDCTL_API=3 etcdctl --write-out=table snapshot status snapshotdb
512
+ ETCDCTL_API=3 etcdctl --write-out=table snapshot status snapshot.db
513
513
```
514
514
515
515
``` console
@@ -616,26 +616,30 @@ Here is an example:
616
616
例如:
617
617
618
618
``` shell
619
- ETCDCTL_API=3 etcdctl --endpoints 10.2.0.9:2379 snapshot restore snapshotdb
619
+ ETCDCTL_API=3 etcdctl --endpoints 10.2.0.9:2379 snapshot restore snapshot.db
620
620
```
621
621
622
622
<!--
623
- Another example for restoring using etcdctl options:
623
+ Another example for restoring using ` etcdctl` options:
624
624
-->
625
- 恢复时也可以指定操作选项,例如 :
625
+ 恢复时使用 ` etcdctl ` 选项的另一个示例 :
626
626
627
627
``` shell
628
- ETCDCTL_API=3 etcdctl snapshot restore --data-dir < data-dir-location> snapshotdb
628
+ ETCDCTL_API=3 etcdctl snapshot restore --data-dir < data-dir-location> snapshot.db
629
629
```
630
630
631
631
<!--
632
- Yet another example would be to first export the environment variable
632
+ where `<data-dir-location>` is a directory that will be created during the restore process.
633
+
634
+ Yet another example would be to first export the `ETCDCTL_API` environment variable
633
635
-->
634
- 另一个例子是先导出环境变量:
636
+ 其中 ` <data-dir-location> ` 是将在恢复过程中创建的目录。
637
+
638
+ 另一个例子是先导出 ` ETCDCTL_API ` 环境变量:
635
639
636
640
``` shell
637
641
export ETCDCTL_API=3
638
- etcdctl snapshot restore --data-dir < data-dir-location> snapshotdb
642
+ etcdctl snapshot restore --data-dir < data-dir-location> snapshot.db
639
643
```
640
644
641
645
<!--
@@ -736,3 +740,12 @@ you perform defragmentation, you use a tool such as [etcd-defrag](https://github
736
740
Kubernetes 项目建议在执行碎片整理时,
737
741
使用诸如 [ etcd-defrag] ( https://github.com/ahrtr/etcd-defrag ) 之类的工具。
738
742
{{< /note >}}
743
+
744
+ <!--
745
+ You can also run the defragmentation tool as a Kubernetes CronJob, to make sure that
746
+ defragmentation happens regularly. See [`etcd-defrag-cronjob.yaml`](https://github.com/ahrtr/etcd-defrag/blob/main/doc/etcd-defrag-cronjob.yaml)
747
+ for details.
748
+ -->
749
+ 你还可以将碎片整理工具作为 Kubernetes CronJob 运行,以确保定期进行碎片整理。
750
+ 有关详细信息,请参阅
751
+ [ ` etcd-defrag-cronjob.yaml ` ] ( https://github.com/ahrtr/etcd-defrag/blob/main/doc/etcd-defrag-cronjob.yaml ) 。
0 commit comments