Skip to content

Commit

Permalink
fix: issue #799
Browse files Browse the repository at this point in the history
Signed-off-by: Fu, Wei <fuweid89@gmail.com>
  • Loading branch information
fuweid committed Mar 19, 2024
1 parent e02a91c commit cfbe0c3
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 deletions.
28 changes: 27 additions & 1 deletion content/en/docs/v3.5/tutorials/how-to-save-database.md
Expand Up @@ -4,13 +4,39 @@ description: Guide to taking a snapshot of the etcd database
weight: 1100
---

## Pre-requisites

* [Install etcdctl, etcdutl](https://etcd.io/docs/v3.5/install/)
* [Setup a local cluster](https://etcd.io/docs/v3.5/dev-guide/local_cluster/)

## Snapshot a database

`snapshot` to save point-in-time snapshot of etcd database:

![11_etcdctl_snapshot_2016051001](https://storage.googleapis.com/etcd/demo/11_etcdctl_snapshot_2016051001.gif)
```bash
etcdctl --endpoints=$ENDPOINT snapshot save DB_NAME
```

### Global Options

#### etcdctl

```bash
--endpoints=[127.0.0.1:2379], gRPC endpoints
```

Snapshot can only be requested from one etcd node, so `--endpoints` flag should contain only one endpoint.

#### etcdutl

```bash
-w, --write-out string set the output format (fields, json, protobuf, simple, table) (default "simple")
```

### Example

![11_etcdctl_snapshot_2016051001](https://storage.googleapis.com/etcd/demo/11_etcdctl_snapshot_2016051001.gif)

```shell
ENDPOINTS=$HOST_1:2379
etcdctl --endpoints=$ENDPOINTS snapshot save my.db
Expand Down
28 changes: 27 additions & 1 deletion content/en/docs/v3.6/tutorials/how-to-save-database.md
Expand Up @@ -4,13 +4,39 @@ description: Guide to taking a snapshot of the etcd database
weight: 1100
---

## Pre-requisites

* [Install etcdctl, etcdutl](https://etcd.io/docs/v3.6/install/)
* [Setup a local cluster](https://etcd.io/docs/v3.6/dev-guide/local_cluster/)

## Snapshot a database

`snapshot` to save point-in-time snapshot of etcd database:

![11_etcdctl_snapshot_2016051001](https://storage.googleapis.com/etcd/demo/11_etcdctl_snapshot_2016051001.gif)
```bash
etcdctl --endpoints=$ENDPOINT snapshot save DB_NAME
```

### Global Options

#### etcdctl

```bash
--endpoints=[127.0.0.1:2379], gRPC endpoints
```

Snapshot can only be requested from one etcd node, so `--endpoints` flag should contain only one endpoint.

#### etcdutl

```bash
-w, --write-out string set the output format (fields, json, protobuf, simple, table) (default "simple")
```

### Example

![11_etcdctl_snapshot_2016051001](https://storage.googleapis.com/etcd/demo/11_etcdctl_snapshot_2016051001.gif)

```shell
ENDPOINTS=$HOST_1:2379
etcdctl --endpoints=$ENDPOINTS snapshot save my.db
Expand Down

0 comments on commit cfbe0c3

Please sign in to comment.