Skip to content

Commit

Permalink
operator-br-updates (#2192)
Browse files Browse the repository at this point in the history
* operator-br-updates

* operator-br-updates

* Update 10.backup-restore-using-operator.md

* Update 10.backup-restore-using-operator.md
  • Loading branch information
abby-cyber authored Jul 26, 2023
1 parent a51cd7e commit 3f33db3
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 28 deletions.
3 changes: 2 additions & 1 deletion docs-2.0/backup-and-restore/nebula-br-ent/2.install-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ To use the BR (Enterprise Edition) tool, you need to install the NebulaGraph Age

|NebulaGraph Enterprise Edition|BR Enterprise Edition|Agent |
|:---|:---|:---|
|3.4.1|3.4.1、3.4.0|3.4.0|
|3.5.x|3.5.1|3.4.0|
|3.4.1|3.4.0 ~ 3.4.1|3.4.0|

## Install BR (Enterprise Edition)

Expand Down
66 changes: 43 additions & 23 deletions docs-2.0/nebula-operator/10.backup-restore-using-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ To backup and restore data using NebulaGraph Operator, the following conditions
- NebulaGraph Operator supports full and incremental backups.
- During data backup, DDL and DML statements in the specified graph space will be blocked. We recommend performing the operation during off-peak hours, such as from 2:00 am to 5:00 am.
- The cluster executing incremental backups and the cluster specified for the last backup must be the same, and the (storage bucket) path for the last backup must be the same.
- Ensure that the time between each incremental backup and the last backup is less than a `wal_ttl`.
- Ensure that the time between each incremental backup and the last backup is less than a [`wal_ttl`](../5.configurations-and-logs/1.configurations/4.storage-config.md#raft_configurations).
- Specifying the backup data of a specified graph space is not supported.
- Before backing up data, you need to create a Secret to restore the credential for pulling the image of the BR-ent tool.

Expand Down Expand Up @@ -74,26 +74,26 @@ metadata:
name: nebula-full-backup
spec:
parallelism: 1
ttlSecondsAfterFinished: 60
ttlSecondsAfterFinished: 600
template:
spec:
imagePullSecrets:
- name: br-ent-secret # The name of the Secret for pulling the image of the BR-ent tool.
restartPolicy: OnFailure
imagePullSecrets:
- name: br-ent-secret # The name of the Secret for pulling the image of the BR-ent tool.
containers:
- image: vesoft/br-ent:v{{br_ent.release}}
- image: reg.vesoft-inc.com/cloud-dev/br-ent:v{{br_ent.release}}
imagePullPolicy: Always
name: backup
command:
- /bin/sh
- -ecx
- exec /usr/local/bin/nebula-br backup full
- --meta $META_ADDRESS:9559 # Fill in the domain name of the Meta service, for example, nebula-metad-0.nebula-metad-headless.nebula.svc.cluster.local:9559.
- --storage s3://$BUCKET
- --s3.access_key $ACCESS_KEY
- --s3.secret_key $SECRET_KEY
- --s3.region $REGION
- --s3.endpoint https://s3.$REGION.amazonaws.com
- 'exec /usr/local/bin/br-ent backup full
--meta nebula-metad-0.nebula-metad-headless.nebula.svc.cluster.local:9559
--storage s3://BUCKET # The storage location of the backup file.
--s3.access_key ACCESS_KEY # The AccessKey for accessing the S3 protocol-compatible storage service.
--s3.secret_key SECRET_KEY # The SecretKey for accessing the S3 protocol-compatible storage service.
--s3.region REGION # The region of the S3 protocol-compatible storage service.
--s3.endpoint https://s3.REGION.amazonaws.com' # The endpoint of the S3 protocol-compatible storage service.
```
### Incremental backup
Expand All @@ -111,21 +111,22 @@ spec:
template:
spec:
restartPolicy: OnFailure
imagePullSecrets:
- name: br-ent-secret
containers:
- image: vesoft/br-ent:v{{br_ent.release}}
- image: reg.vesoft-inc.com/cloud-dev/br-ent:v{{br_ent.release}}
imagePullPolicy: Always
name: backup
command:
- /bin/sh
- -ecx
- exec /usr/local/bin/nebula-br backup incr
- --meta $META_ADDRESS:9559 # Fill in the domain name of the Meta service, for example, nebula-metad-0.nebula-metad-headless.nebula.svc.cluster.local:9559.
- --base $BACKUP_NAME
- --storage s3://$BUCKET
- --s3.access_key $ACCESS_KEY
- --s3.secret_key $SECRET_KEY
- --s3.region $REGION
- --s3.endpoint https://s3.$REGION.amazonaws.com
- 'exec /usr/local/bin/br-ent backup incr
--meta nebula-metad-0.nebula-metad-headless.nebula.svc.cluster.local:9559
--storage s3://BUCKET # The storage location of the backup file.
--s3.access_key ACCESS_KEY # The AccessKey for accessing the S3 protocol-compatible storage service.
--s3.secret_key SECRET_KEY # The SecretKey for accessing the S3 protocol-compatible storage service.
--s3.region REGION # The region of the S3 protocol-compatible storage service.
--s3.endpoint https://s3.REGION.amazonaws.com' # The endpoint of the S3 protocol-compatible storage service.
```

### Parameter description
Expand All @@ -138,7 +139,7 @@ The main parameters are described as follows:
| `spec.parallelism` |1 |The number of tasks executed in parallel. |
| `spec.ttlSecondsAfterFinished` | 60 | The time to keep task information after the task is completed. |
| `spec.template.spec.containers[0].image` | `vesoft/br-ent:{{br_ent.release}}`|The image address of the NebulaGraph BR Enterprise Edition tool. |
| `spec.template.spec.containers[0].command`| - | The command for backing up data to the storage service compatible with the S3 protocol.<br/>For descriptions of the options in the command, see [Parametr description](../backup-and-restore/nebula-br-ent/3.backup-data.md#_12). |
| `spec.template.spec.containers[0].command`| - | The command for backing up data to the storage service compatible with the S3 protocol.<br/>For descriptions of the options in the command, see [Parametr description](../backup-and-restore/nebula-br-ent/3.backup-data.md#_13). |


For more settings of the Job, see [Kubernetes Jobs](https://kubernetes.io/docs/concepts/workloads/controllers/job/).
Expand Down Expand Up @@ -242,5 +243,24 @@ kubectl apply -f <restore_file_name>.yaml
Run the following command to check the status of the NebulaRestore object.

```bash
kubectl get rt <NebulaRestore_name> -w
kubectl get rt <NebulaRestore_name> -n <namespace>
# Output example:
NAME STATUS STARTED COMPLETED AGE
restore1 Complete 67m 59m 67m
```

After the restore job is completed, a new NebulaGraph cluster is created with the name automatically generated by the Operator. To check the status of the new cluster:

```bash
kubectl get nc -n <namespace>
# Output example:
NAME GRAPHD-DESIRED GRAPHD-READY METAD-DESIRED METAD-READY STORAGED-DESIRED STORAGED-READY AGE
nebula 1 1 1 1 3 3 2d3h
ngxvsm 1 1 1 1 3 3 92m # The newly created cluster.
```



2 changes: 1 addition & 1 deletion docs-2.0/nebula-operator/2.deploy-nebula-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ image:
image: vesoft/nebula-operator:{{operator.tag}}
imagePullPolicy: Always
kubeRBACProxy:
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0
image: bitnami/kube-rbac-proxy:0.14.2
imagePullPolicy: Always
kubeScheduler:
image: registry.k8s.io/kube-scheduler:v1.24.11
Expand Down
2 changes: 1 addition & 1 deletion docs-2.0/nebula-operator/7.operator-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ This error is generally caused by a DNS resolution failure, and you need to chec
image: vesoft/nebula-operator:{{operator.tag}}
imagePullPolicy: Always
kubeRBACProxy:
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0
image: bitnami/kube-rbac-proxy:0.14.2
imagePullPolicy: Always
kubeScheduler:
image: registry.k8s.io/kube-scheduler:v1.24.11
Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ extra:
branch: release-3.5
tag: v3.5.0
br_ent:
release: 3.5.0
tag: v3.5.0
release: 3.5.1
tag: v3.5.1
agent:
release: 3.4.0
tag: v3.4.0
Expand Down

0 comments on commit 3f33db3

Please sign in to comment.