You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RUN wget --no-check-certificate "https://d.juicefs.com/juicefs/releases/download/v1.0.2/juicefs-1.0.2-linux-amd64.tar.gz" && tar -zxf "juicefs-1.0.2-linux-amd64.tar.gz" ;\
English | [简体中文](../zh-cn/juicefs_backup_and_restore.md) |
2
+
3
+
目录
4
+
=============
5
+
*[juiceopt备份](#开启juiceopt-备份)
6
+
*[准备工作](#准备工作)
7
+
*[填写配置](#填写backup-crd-的-yaml-配置信息)
8
+
*[运行备份](#运行备份)
9
+
10
+
*[恢复](#恢复)
11
+
*[准备工作](#恢复集群的准备工作)
12
+
13
+
# startup juiceopt backup
14
+
## prerequire
15
+
1. prepare S3 strorage (if you want other types of storage, reference the juicfs document),Obtain the access-key and secret-key . In the example of this article, it use minio ,and the instance is minio-1668754867, and the bucket named `test` so the url is http://test.minio-1668754867.minio:9000/ , you can modify it according your situations, and how to do you can refer to juicefs documents.
16
+
17
+
2. Install the redis , although juicefs also support sqlite as meta data storage, buf if you do so, you should sync the meta file from s3 at first,and I do not recommend it. redis url is the form as follow:
18
+
```
19
+
redis://<redis-server-name/IP>:<port>/<NO of database>
20
+
```
21
+
in the example of this article, redis-server-name is redis-leader, the number of database is 1, So the redis url is `redis://redis-leader:6379/1`
22
+
23
+
3. Verfiy whether it works: suppose the backup directory is juicefs , you can login in Pod's backup container , execute commanas as follow:
I suppose that the cluster you want restore is `sample2`
67
+
### and `config map`
68
+
1. At first give the `config map` a name,name's form is <nameofrestorecluster>-restore, this article suppose that cluster name is sample2, so `config map`'s name is `sample2-restore`
69
+
2. Create config map
70
+
* prepare for juiceopt parameters:
71
+
build a yaml file, named `juiceopt.yaml`, fill it with:
72
+
```
73
+
juiceMeta: <redis url>
74
+
backupSecretName: <S3's secret name>
75
+
juiceName: <backup directory under S3 bucket>
76
+
```
77
+
for example, in the example of this article, juiceopt.yaml is:
78
+
```
79
+
juiceMeta: "redis://redis-leader:6379/1"
80
+
backupSecretName: sample-backup-secret
81
+
juiceName: juicefs
82
+
```
83
+
* use `kubectl create configmap` create a configmap
84
+
configmap has two keys , `from` and `juice.opt` that respectively indicate the cluster has been backuped which we should restore from, and the juice parameter.
85
+
but `date` key is optional, it indicates the time where restore to (format is:"2006-01-02 09:07:41"), if it does not have got this key , it will restore to now, use the commands as follows:
in the example of this article, we suppose the cluster need to restore is sample2, the config method can refer to [radondb cluster configuration](./deploy_radondb-mysql_operator_on_k8s.md)
91
+
### use kubectl apply the yaml
92
+
use `kubectl apply ` apply the yaml file, for the example, use the commands as follow:
0 commit comments