Skip to content

Commit

Permalink
feature(doc): backup minio data (#627)
Browse files Browse the repository at this point in the history
* feature(doc): backup minio data doc

Signed-off-by: soulseen <zhuxiaoyang1996@gmail.com>

* feature(doc): get minio access from secret

Signed-off-by: soulseen <zhuxiaoyang1996@gmail.com>

As it's doc PR, directly merged.
  • Loading branch information
soulseen committed May 3, 2021
1 parent b2b0fd7 commit 2d63325
Showing 1 changed file with 45 additions and 1 deletion.
46 changes: 45 additions & 1 deletion docs/LCM/backup-minio-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,48 @@

Documentation shown here guides you how to backup the Minio data.

TBD
## Prerequisites

1. You need to install [mc]( https://docs.min.io/docs/minio-client-complete-guide.html) that is the MinIO CLI.

2. Get the `access_key` and `secret_key` of MinIO.

```shell
$ kubectl get secret minio-access-secret -n cluster-sample-ns -o jsonpath='{.data.accesskey}' | base64 --decode
admin
$ kubectl get secret minio-access-secret -n cluster-sample-ns -o jsonpath='{.data.secretkey}' | base64 --decode
minio123
```

3. Please make sure you have the correct MinIO address to access.

## Backup

### Step 1

Create the directory to storage Harbor Data in the backup pod, please make sure you have the Read/Write Permissions.

```shell
mkdir {minio_backup_directory}
```

### Step 2

Setup mc config.

```shell
mc --insecure -C {minio_backup_directory} config host add minio \ http(s)://{minio_address}:9000 {minio_access_key} {minio_secret_key}
```

### Step 3

Start backup minio data

```shell
mc --insecure -C {minio_backup_directory} \
cp -r minio/harbor {minio_backup_directory}
```

### Step 4

Make sure that all data are backuped in the {minio_backup_directory}.

0 comments on commit 2d63325

Please sign in to comment.