Back up and restore YugabyteDB Anywhere
Your YugabyteDB Anywhere installation includes provider configurations, KMS configurations, certificates, users, roles, and other components required for managing YugabyteDB universes.
If you installed YugabyteDB Anywhere using YBA installer, use the yba-ctl CLI to back up and restore your YugabyteDB Anywhere installation. The CLI executes the yb_platform_backup.sh
script to back up an existing YugabyteDB Anywhere server and restore it, when needed, for disaster recovery or migrating to a new server.
Back up YugabyteDB Anywhere
To back up your YugabyteDB Anywhere installation, perform the following steps:
-
Run the
createbackup
command, as follows:sudo yba-ctl createBackup <output_path> [flags]
The
createBackup
command executes theyb_platform_backup.sh
script to create a backup of your YugabyteDB Anywhere instance. Specify theoutput_path
where you want the backup.tgz
file to be stored.The
createBackup
command creates a timestampedtgz
file for the backup. For example:sudo yba-ctl createBackup ~/test_backup ls test_backup/
backup_23-04-25-16-54.tgz
-
Verify that the backup file, 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.
Backup options
The following table describes optional flags you can include with the createBackup
command.
Flag | Description | Default |
---|---|---|
‑‑disable_version_check | Exclude version metadata when creating backup. | false |
--exclude_prometheus | Exclude Prometheus metric data from backup. | false |
--exclude_releases | Exclude YugabyteDB releases from backup. | false |
-h, --help | Help for createBackup . |
|
--skip_restart | Don't restart processes during execution. | true |
--verbose | Display extra information in the output. | false |
-f, --force (global flag) | Run in non-interactive mode. All user confirmations are skipped. | |
--log_level (global flag) | Log level for this command. Levels: panic, fatal, error, warn, info, debug, trace. |
"info" |
Restore YugabyteDB Anywhere
To restore the YugabyteDB Anywhere content from your saved backup, perform the following:
-
If YugabyteDB Anywhere is not installed, install it using YBA Installer.
-
Copy the backup file from your storage location.
-
Run the
restoreBackup
command as follows:sudo yba-ctl restoreBackup <input_path> [flags]
Specify the
input_path
to the backup file as the only argument. For example:sudo yba-ctl restoreBackup ~/test_backup/backup_23-04-25-16-64.tgz
The restoreBackup
command executes the yb_platform_backup.sh
script to restore from the specified backup of your YugabyteDB Anywhere instance.
When finished, the restored YugabyteDB Anywhere is ready to continue managing your universes and clusters.
Restore options
The following table describes optional flags you can include with the restoreBackup
command.
Flag | Description | Default |
---|---|---|
-h, --help | Help for restoreBackup . |
|
--migration | Restore from a Replicated installation. For information on migrating from Replicated, refer to Migrate from Replicated. | false |
--skip_dbdrop | Skip dropping the YugabyteDB Anywhere database before a migration restore. Valid only if --migration is true. | false |
--skip_restart | Don't restart processes during command execution. | true |
‑‑use_system_pg | Use system path's pg_restore as opposed to installed binary. |
false |
--verbose | Display extra information in the output. | false |
-f, --force (global flag) | Run in non-interactive mode. All user confirmations are skipped. | |
--log_level (global flag) | Log level for this command. Levels: panic, fatal, error, warn, info, debug, trace. |
"info" |