Backup
You can execute this operation from any macOS or GNU/Linux machine that has sufficient space to store the backup archive.
前提条件¶
備考
All utilities in the table below must be installed on the host where the backup will be created.
| Utility | バージョン | 設定 | ドキュメンテーション |
|---|---|---|---|
helm |
1.23 |
Configure helm to access the Kubernetes cluster (verify access using the helm status dr command). |
helm documentation |
jq |
最新 | A JSON processing tool. | jq website |
kubectl |
1.23 |
Configure kubectl to access the Kubernetes cluster (verify this with the kubectl cluster-info command). |
kubectl documentation |
pg_dump |
12 |
This is a component of the PostgreSQL package. | PostgreSQL download page |
mongodump |
100.6.0 |
A tool to create a binary export of a database's contents. | MongoDB mongodump documentation |
Custom certificates backup¶
The DataRobot application charts allow you to define custom certificates upon installation of the application. If your cluster configuration includes such definitions, you should back them up as well.
Use the helm get values dr command to verify that a globals.certs section is present in your cluster configuration; an example output is shown below:
globals:
certs:
- secret: rabbit-cert
path: rabbit/rabbit-cert.pem
In the example above, there is a Kubernetes secret named rabbit-cert. Depending on the cluster, there may be more than one such secret. If your configuration includes multiple secrets, back up each individually using the command demonstrated in the example below, providing each secret in place of rabbit-cert.
mkdir -p ${BACKUP_LOCATION}/secrets/certs
kubectl -n $DR_CORE_NAMESPACE get secret rabbit-cert -o jsonpath='{.data.*}' > ${BACKUP_LOCATION}/secrets/certs/<secret_name.crt>
Replace $BACKUP_LOCATION with your backup directory, $DR_CORE_NAMESPACE with your namespace, and <secret_name.crt> with the appropriate filename for the secret.
注意
The command shown above is included in the automation script, but if there are multiple such secrets, DataRobot recommends manually backing up certificates before running the script.
使用状況¶
The script below creates a backup of the following components:
Copy the script available in the DataRobot OSS repository. Ensure you pass the DR_NAMESPACE value as an argument and BACKUP_LOCATION, which is the directory created to store backups.