Restore universe data
To access backups from a specific universe, navigate to the universe and choose Backups.
To access all universe backups, navigate to Backups.
Restore an entire or incremental backup
You can restore YugabyteDB universe data from a backup as follows:
-
In the Backups list, select the backup to restore to display the Backup Details.
-
Click Restore Entire Backup. Alternatively, if your backup includes incremental backups, you can restore a part of an incremental backup chain by selecting an increment from the list in the Backup Details view and clicking its Restore to this point.
-
In the Restore Backup dialog, select the universe (target) to which you want to restore the backup.
-
If you are restoring data from a universe that has, or previously had, encryption at rest enabled, then you must select the KMS configuration to use so that the master keys referenced in the metadata file can be retrieved. If the universe was previously encrypted at rest, but is not currently, then the retrieved keys assure that any existing files can be decrypted. The retrieved keys are used to build and augment the universe key registry on the restored universe with the required master keys. The universe data files are restored normally afterwards.
-
To rename databases (YSQL) or keyspaces (YCQL), select the Rename option.
If you are restoring a backup to a universe with a existing databases with the same name, you must rename the database.
-
Optionally, specify the number of parallel threads that are allowed to run. This can be any number between
1
and100
. -
If you chose to rename databases or keyspaces, click Next, then enter new names for the databases or keyspaces that you want to rename.
-
Click Restore.
The restore begins immediately. When finished, a completed Restore Backup task appears under Tasks > Task History.
To confirm that the restore succeeded, select the Tables tab to compare the original table with the table to which you restored.
Restore selected databases or keyspaces and tables
You can restore only a specific database (YSQL) or keyspace (YCQL).
In addition, if you are restoring a YCQL keyspace, you can restore only selected tables in the keyspace.
To restore, do the following:
-
In the Backups list, select the backup to restore to display the Backup Details.
-
In the list of databases (YSQL) or keyspaces (YCQL), click Restore for the database or keyspace you want to restore. If your backup includes incremental backups, to display the databases or keyspaces, click the down arrow for the increment at which you want to restore.
-
In the Restore Backup dialog, select the universe (target) to which you want to restore the backup.
-
If you are restoring data from a universe that has, or previously had, encryption at rest enabled, then you must select the KMS configuration to use so that the master keys referenced in the metadata file can be retrieved. If the universe was previously encrypted at rest, but is not currently, then the retrieved keys assure that any existing files can be decrypted. The retrieved keys are used to build and augment the universe key registry on the restored universe with the required master keys. The universe data files are restored normally afterwards.
-
To rename databases (YSQL) or keyspaces (YCQL), select the Rename option.
If you are restoring a YSQL backup to a universe with an existing database with the same name, you must rename the database.
-
If you selected a YCQL backup, you can choose to select specific tables to restore, by selecting the Select a subset of tables option.
Note that this option is only available if the following conditions are met:
- The backup was made on a universe running YugabyteDB v2.16.0 or later.
- The selected target universe is running YugabyteDB v2.18.0 or later.
-
If you chose to rename databases/keyspaces or select tables, click Next to rename keyspaces and, if applicable, select tables.
-
Click Restore.
The restore begins immediately. When finished, a completed Restore Backup task appears under Tasks > Task History.
To confirm that the restore succeeded, select the Tables tab to compare the original table with the table to which you restored.
Advanced restore procedure
In addition to the basic restore, an advanced option is available if you have more than one YugabyteDB Anywhere installation and want to restore a database or keyspace from a different YugabyteDB Anywhere installation to the current universe.
To perform an advanced restore, do the following:
-
On the Backups tab of the universe to which you want to restore, click Advanced and choose Advanced Restore to display the Advanced Restore dialog.
-
Choose the type of API.
-
Specify the location of the backup you want to restore.
-
Select the cloud provider-specific configuration of the backup storage. The storage could be on Google Cloud, Amazon S3, Azure, or Network File System.
-
Specify the name of the database or keyspace from which you are performing a restore.
-
To rename databases (YSQL) or keyspaces (YCQL) in the backup before restoring, select the rename option.
-
If the backup involved universes that had encryption at rest enabled, then select the KMS configuration to use.
-
If you are using YBA version prior to 2.16 to manage universes with YugabyteDB version prior to 2.16, you can optionally specify the number of parallel threads that are allowed to run. This can be any number between 1 and 100.
-
If you chose to rename databases/keyspaces, click Next, then enter new names for the databases/keyspaces that you want to rename.
-
Click Restore.