Skip to content

Commit 4ae16ed

Browse files
authored
Merge pull request #43725 from my-git9/path-15117
[zh-cn] sync configure-upgrade-etcd.md
2 parents 08c05d7 + 4ad2648 commit 4ae16ed

File tree

1 file changed

+24
-11
lines changed

1 file changed

+24
-11
lines changed

content/zh-cn/docs/tasks/administer-cluster/configure-upgrade-etcd.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -495,12 +495,12 @@ etcd 支持内置快照。快照可以从使用 `etcdctl snapshot save` 命令
495495

496496
<!--
497497
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`:
499499
-->
500-
下面是一个示例,用于获取 `$ENDPOINT` 所提供的键空间的快照到文件 `snapshotdb`
500+
下面是一个示例,用于获取 `$ENDPOINT` 所提供的键空间的快照到文件 `snapshot.db`
501501

502502
```shell
503-
ETCDCTL_API=3 etcdctl --endpoints $ENDPOINT snapshot save snapshotdb
503+
ETCDCTL_API=3 etcdctl --endpoints $ENDPOINT snapshot save snapshot.db
504504
```
505505

506506
<!--
@@ -509,7 +509,7 @@ Verify the snapshot:
509509
验证快照:
510510

511511
```shell
512-
ETCDCTL_API=3 etcdctl --write-out=table snapshot status snapshotdb
512+
ETCDCTL_API=3 etcdctl --write-out=table snapshot status snapshot.db
513513
```
514514

515515
```console
@@ -616,26 +616,30 @@ Here is an example:
616616
例如:
617617

618618
```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
620620
```
621621

622622
<!--
623-
Another example for restoring using etcdctl options:
623+
Another example for restoring using `etcdctl` options:
624624
-->
625-
恢复时也可以指定操作选项,例如
625+
恢复时使用 `etcdctl` 选项的另一个示例
626626

627627
```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
629629
```
630630

631631
<!--
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
633635
-->
634-
另一个例子是先导出环境变量:
636+
其中 `<data-dir-location>` 是将在恢复过程中创建的目录。
637+
638+
另一个例子是先导出 `ETCDCTL_API` 环境变量:
635639

636640
```shell
637641
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
639643
```
640644

641645
<!--
@@ -736,3 +740,12 @@ you perform defragmentation, you use a tool such as [etcd-defrag](https://github
736740
Kubernetes 项目建议在执行碎片整理时,
737741
使用诸如 [etcd-defrag](https://github.com/ahrtr/etcd-defrag) 之类的工具。
738742
{{< /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

Comments
 (0)