Back up and restore YugabyteDB Anywhere
YugabyteDB Anywhere installations include configuration settings, certificates and keys, and other components required for creating and managing YugabyteDB universes.
Take regularly scheduled backups of your YugabyteDB Anywhere installation for recovery in case of the loss of the node running your YugabyteDB Anywhere instance. (Available in v2026.1.2.0 and later.)
You can also perform backups on demand.
Limitations
- Automatic backups are not compatible with high availability.
- Automatic backups do not include universe Prometheus data or locally stored YugabyteDB releases.
- By default, automatic backups retain the 5 most recent copies. Note that older backups are more likely to be inconsistent with the current state of your universes.
Prerequisites
- Configure a storage location for the backups.
Set up automatic backups
To configure automatic backups of your YugabyteDB Anywhere installation, do the following:
-
Navigate to Admin>Platform HA and Backups and select Automated Platform Backups.
-
Click Enable automated platform backups (or Edit if already configured).
-
Select the storage configuration you want to use for the backup. For more information, see Configure backup storage.
-
Enter a name for the folder where you want to store the backups.
If you are backing up more than one YugabyteDB Anywhere instance to the same storage, provide a name that uniquely identifies the instance you are backing up. For example,
yba_104.72.167.2_backups. -
Enter the backup frequency in minutes. 5 minutes works well for most purposes. More frequent backups provide more recovery points but may impact performance.
-
Click Apply Changes.
Click Remove to disable periodic backups (this stops automatic backups but does not delete existing backup files).
On-demand backups
You can back up your YugabyteDB Anywhere installation on demand. On-demand backups can include Prometheus data and YugabyteDB releases, in addition to your YugabyteDB Anywhere settings and metadata.
On-demand backups are stored locally on the node that hosts your installation.
Perform backup on demand:
- Before upgrading YugabyteDB Anywhere.
- When migrating YugabyteDB Anywhere to a different host.
- When you need to include Prometheus metrics data.
- For ad-hoc backups outside your periodic backup schedule.
To create a one-time backup:
-
Navigate to Admin>Platform HA and Backups and select Automated Platform Backups.
-
Click One-Time Platform Export.
-
Select the data you want to back up.
- Platform Metadata: YugabyteDB Anywhere instance settings and metadata.
- Local YugabyteDB Releases: YugabyteDB releases stored on universe nodes.
- Universe Metrics (Prometheus Data): Prometheus metrics data for your universes.
-
Specify the destination for the backup, as a full path. For example,
/opt/yugabyte/yba_backupsor/tmp/yba_export.Ensure the directory exists and the
yugabyteuser has write permissions for the location.The backup is saved as a
.tar.gzfile with a timestamped name. -
Click Export.
You can monitor progress of the backup on the Tasks page.
Restore YugabyteDB Anywhere
When restoring YugabyteDB Anywhere (for example, after the loss of the node running YugabyteDB Anywhere):
- Create a fresh YugabyteDB Anywhere installation, either on the existing node after it is recovered, or on a new node.
- Using the new YugabyteDB Anywhere instance, restore from the most recent backup.
When doing a restore, YugabyteDB Anywhere performs the following checks:
-
Existing universes.
By default, due to the possibility of data loss, you can only do a restore if your instance is not managing any universes. You can override this by setting the Allow YBA Restore With Universes Global Runtime Configuration option (config key
yb.yba_backup.allow_restore_with_universes) to true. -
The selected backup is not older than one day.
By default you cannot restore from backups older than one day, as the backup may be inconsistent if you performed management operations after the backup was taken. You can override this by setting the Allow YBA Restore With Old Backup Global Runtime Configuration option (config key
yb.yba_backup.allow_restore_with_old_backup) to true.
Refer to Manage runtime configuration settings. Note that only a Super Admin user can modify Global configuration settings.
Automated backup
To restore a YugabyteDB Anywhere backup from external storage:
-
If YugabyteDB Anywhere is not installed, install it.
-
Navigate to Admin>Platform HA and Backups and select Automated Platform Backups.
-
Click Advanced Restore.
If YugabyteDB Anywhere detects existing universes, a warning is shown about potential data loss.
-
Select Cloud Backup.
-
Select the storage configuration for the backup you want to restore.
-
Enter the name of the folder that you specified for the periodic backup you are restoring (for example,
yba_104.72.167.2_backups). -
Click Restore.
YugabyteDB Anywhere restores the most recent backup and restarts automatically after the restore finishes.
On-demand backup
To restore a YugabyteDB Anywhere backup from an on-demand backup:
-
If YugabyteDB Anywhere is not installed, install it.
-
Navigate to Admin>Platform HA and Backups and select Automated Platform Backups.
-
Click Advanced Restore.
If YugabyteDB Anywhere detects existing universes, a warning is shown about potential data loss.
-
Select Local Backup.
-
Enter the full file path to the backup file.
For example,
/opt/yba_backups/yba_backup_20240115_120000.tar.gz. -
Click Restore.
YugabyteDB Anywhere restores from the backup and restarts automatically after the restore finishes.