Skip to content

Commit 83917d7

Browse files
committed
doc,chart: add the both s3 nfs backup documents #735
1 parent 448e4ff commit 83917d7

File tree

3 files changed

+45
-3
lines changed

3 files changed

+45
-3
lines changed

charts/mysql-operator/crds/mysql.radondb.com_mysqlclusters.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,15 @@ spec:
7070
description: Represents the name of the secret that contains credentials
7171
to connect to the storage provider to store backups.
7272
type: string
73+
bothS3NFS:
74+
description: Specify that crontab job backup both on NFS and S3 storage.
75+
properties:
76+
nfsSchedule:
77+
description: NFS schedule.
78+
type: string
79+
s3Schedule:
80+
type: string
81+
type: object
7382
metricsOpts:
7483
default:
7584
enabled: false

docs/en-us/backup_cron.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Contents
55
- [Cron expression format](#cron-expression-format)
66
- [Special characters](#special-characters)
77
- [Predefined schedules](#predefined-schedules)
8-
8+
- [both cron backup for s3 and nfs](#both-s3-nfs)
99
# Overview
1010
The scheduled backup is currently supported for both S3 and NFS backups. You can use the cron expression to specify the backup schedule. Set the `backupSchedule` parameter under the `spec` field in the YAML file of the cluster, for example:
1111

@@ -64,4 +64,21 @@ You may use one of several pre-defined schedules in place of a cron expression.
6464
| @monthly | Run once a month, midnight, first of month | 0 0 0 1 * * |
6565
| @weekly | Run once a week, midnight on Sunday | 0 0 0 * * 0 |
6666
| @daily (or @midnight) | Run once a day, midnight | 0 0 0 * * * |
67-
| @hourly | Run once an hour, beginning of hour | 0 0 * * * * |
67+
| @hourly | Run once an hour, beginning of hour | 0 0 * * * * |
68+
69+
# both cron backup for s3 and nfs
70+
if you have specified the `backupSecretName` , `nfsServerAddress` and `backupSchedule` , the operator will run nfs backup instead of s3 backup, but if you want backup them both, you should specify `bothS3NFS`
71+
field. it has two sub fields.
72+
* nfsSchedule: nfs' Cron expression, reference from [Predefined schedules](#Predefined-schedules)
73+
* s3Schedule: s3's Cron expression, reference from [Predefined schedules](#Predefined-schedules)
74+
for examples:
75+
```yaml
76+
...
77+
spec:
78+
replicas: 3
79+
mysqlVersion: "5.7"
80+
bothS3NFS:
81+
nfsSchedule: "0 0 0 * * *"
82+
s3Schedule: "0 0 2 * * *"
83+
...
84+
```

docs/zh-cn/backup_cron.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- [Cron 表达式格式](#cron-表达式格式)
66
- [特殊字符](#特殊字符)
77
- [预定义时间表](#预定义时间表)
8-
8+
- [S3与NFS联合定时备份](#S3与NFS联合定时备份)
99
# 简介
1010
目前,无论 S3 还是 NFS 备份,均支持定时备份,并支持使用 Cron 表达式来指定备份的时间策略。您只需直接在集群的 YAML 文件的 `spec` 下设置 `backupSchedule` 字段。例如:
1111

@@ -67,3 +67,19 @@ spec:
6767
| @weekly | 每周执行一次,在周六和周日之间的夜晚 12 点执行 | 0 0 0 * * 0 |
6868
| @daily(或 @midnight| 每日执行一次,在夜晚 12 点执行 | 0 0 0 * * * |
6969
| @hourly | 每小时执行一次,在第 1 分钟执行 | 0 0 * * * * |
70+
71+
# S3与NFS联合定时备份
72+
同时配置了 `backupSecretName``nfsServerAddress` 以及 `backupSchedule` 情况下, 定时备份会优先使用 `nfs` 进行备份,而不会进行 S3 备份 如果您需要同时进行 `S3``nfs` 的定时备份, 需要新增 `bothS3NFS` 选项. 有如下两个子项:
73+
* nfsSchedule: nfs 备份Cron 表达式, 格式参见 [预定义时间表](#预定义时间表)
74+
* s3Schedule: s3 备份Cron 表达式, 格式参见 [预定义时间表](#预定义时间表)
75+
示例:
76+
```yaml
77+
...
78+
spec:
79+
replicas: 3
80+
mysqlVersion: "5.7"
81+
bothS3NFS:
82+
nfsSchedule: "0 0 0 * * *"
83+
s3Schedule: "0 0 2 * * *"
84+
...
85+
```

0 commit comments

Comments
 (0)