Skip to content

Database restore procedure

The following outlines the prerequisites and usage of a script to restore DataRobot's PostgreSQL and MongoDB databases. Secrets must be restored before running this script.

This operation can be executed from any macOS or GNU/Linux machine that has enough space to store the backup files and run the necessary tools.

前提条件

Ensure the following tools are installed on the host where the restore operation will be performed:

ツール バージョン Purpose/Notes Installation link
Helm 1.23 or later Must be configured to access the Kubernetes cluster where the DataRobot application is running. Verify with helm status dr -n <your-datarobot-namespace>. Helm Installation Guide
jq 最新バージョン A lightweight and flexible command-line JSON processor. jq download page
kubectl 1.23 or later Must be configured to access the Kubernetes cluster. Verify with kubectl cluster-info. Kubernetes Tools Documentation
PostgreSQL client tools 12.x Includes pg_dump and pg_restore. Used for PostgreSQL database restore operations. PostgreSQL Downloads
MongoDB Database Tools 100.6.0 or compatible Includes mongodump and mongorestore. Used for MongoDB database restore operations. MongoDB Database Tools Documentation

備考

While pg_dump and mongodump are listed, database restore operations typically use pg_restore and mongorestore respectively. Please confirm the specific client tool dependencies of the db_restore_script.py mentioned below.

重要

You must restore your DataRobot secrets before running the database restore script.

Using the database restore script

  1. Copy the db_restore_script.py from the datarobot-oss support scripts repository.
  2. When executing the script, ensure you pass the DR_NAMESPACE (your DataRobot core namespace) and BACKUP_LOCATION (the directory where your database backups are stored) values as arguments.