A backup takes a snapshot of both the metadata stored in the Dataproc Metastore service and the service configuration. You can recover it in a service by restoring.
This page explains how to create a backup of an existing Dataproc Metastore service.
To backup metadata, you must be granted an IAM role containing the
metastore.backups.createIAM permission. The Dataproc Metastore specific roles
roles/metastore.metadataOperatorinclude backup permission.
You can give backup permission to users or groups by using the
For more information, see Dataproc Metastore IAM and access control.
Back up metadata from a service
To backup metadata from a service, start a backup on the Service detail page
opened in a local browser, use the
gcloud tool, or issue a
Dataproc Metastore API method backups.create.
You can create and store up to 7 backups at a time for each Dataproc Metastore service. The backups are fully managed by Dataproc Metastore.
While a backup is running, no updates can be made to the service. You can still use the service while it's undergoing a backup.
To backup metastore from a Dataproc Metastore service, complete the following steps:
In the Cloud Console, open the Dataproc Metastore page:
On the Dataproc Metastore page, click the name of the service you'd like to backup metadata from. The Service detail page opens.
At the top of the page, click Backup. The Backup page opens.
Enter the Backup name.
Optional: Enter a Description of the backup.
Click Backup to start the backup.
Verify that you have returned to the Service detail page, and that your backup appears under Backups on the Backup/Restore tab.
Run the following
gcloud metastore services backups createcommand to backup metadata from a service:
gcloud metastore services backups create BACKUP \ --location=LOCATION \ --service=SERVICE \ --description=DESCRIPTION \
Replace the following:
BACKUP: The ID of the backup or fully qualified identifier for the backup.
LOCATION: The location of the service.
SERVICE: The name of the service.
DESCRIPTION: The description of the backup.
Verify that the backup creation was successful.
Follow the API instructions to backup metadata from a service by using the APIs Explorer.
When the backup completes, the service automatically enters active state regardless of whether or not it succeeded.
To view a service's backups, refer to the Backup/Restore tab on the Service detail page in the Cloud Console.
A list of backups is available on the UI. Deleting the service itself deletes all backups under that service.
If there are already 7 backups in a service, then you must first manually delete a backup before creating a new one. You can delete existing backups from the Backup/Restore tab.
- The user creating the backup doesn't have
- Learn more about importing metadata.
- Learn more about updating and deleting a service.
- Learn more about data storage for internal tables.