Back Up and Restore Yugabyte Platform
Yugabyte Platform installations include configuration settings, certificates and keys, and other components required for orchestrating and managing YugabyteDB universes.
You can use the Yugabyte Platform backup script to back up an existing Yugabyte Platform server and restore it, when needed, for disaster recovery or migrating to a new server.
Back Up a Yugabyte Platform Server
To back up the Yugabyte Platform server, perform the following:
-
Copy the the Yugabyte Platform backup script
yb_platform_backup.shfrom the yugabyte-db repository using the followingwgetcommand:wget https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/managed/devops/bin/yb_platform_backup.sh -
Run the
yb_platform_backup.shscript using thebackupcommand, as follows:./yb_platform_backup.sh create --output <output_path> [--data_dir <data_dir>] [--exclude_prometheus]create runs the backup of the Yugabyte Platform server.
output_path specifies the location for the
.taroutput file.data_dir is optional. It specifies the data directory to be backed up. Default is
/opt/yugabyte.--exclude_prometheus is optional. It excludes Prometheus metrics from the backup.
-
Verify that the backup
.tarfile, with the correct timestamp, is in the specified output directory. -
Upload the backup file to your preferred storage location and delete it from the local disk.
Restore a Yugabyte Platform Server
To restore the Yugabyte Platform content from your saved backup, perform the following:
-
Copy the the
yb_platform_backup.shscript from the yugabyte-db repository using the followingwgetcommand:wget https://raw.githubusercontent.com/yugabyte/yugabyte-db/master/managed/devops/bin/yb_platform_backup.sh -
Copy the backup
.tarfile from your storage location. -
Run the
yb_platform_backup.shscript using therestorecommand:./yb_platform_backup.sh restore --input <input_path> [--destination <destination>]restore restores the Yugabyte Platform content.
input_path is the path to the input
.tarfile.destination is optional. It specifies the output location for data. Default is
/opt/yugabyte.
Upon completion of the preceding steps, the restored Yugabyte Platform is ready to continue orchestrating and managing your universes and clusters.