Restore Dataproc Metastore from a backup

Stay organized with collections Save and categorize content based on your preferences.

Restore allows you to recover your Dataproc Metastore service's stored metadata and configuration from a backup.

This page explains how to restore a Dataproc Metastore service's metadata.

Access control

  • To restore metadata, you must request an IAM role containing the and metastore.backups.use IAM permissions. The Dataproc Metastore specific roles roles/metastore.admin and roles/metastore.editor include restore permission.

  • You can give restore permission to users or groups by using the roles/owner and roles/editor legacy roles.

For more information, see Dataproc Metastore IAM and access control.

Restore a service from a backup

To restore a service from a backup, choose a backup on the Service detail page opened in a local browser, use the gcloud CLI, or issue a Dataproc Metastore API method services.restore.

You have the option to restore metadata with the current service configuration or restore metadata with the backup service configuration. You can restore the metadata and backup service configuration at the same time. The configuration includes settings such as network, port, and service tier, which are the same configurations that you can change using the API method service.update.

You can't make any updates to the service while a restore is pending. You can still use the service while it's undergoing a restore.

To restore a Dataproc Metastore service from a backup, complete the following steps:


  1. In the Google Cloud console, open the Dataproc Metastore page:

    Open Dataproc Metastore in the Google Cloud console

  2. On the Dataproc Metastore page, click the name of the service you'd like to restore metadata into. The Service detail page opens.

    Service detail page
  3. Click the Backup/Restore tab to view your backups for the service.

  4. On the right of the backup you'd like to use, click and select Restore. The restore page opens.

    You can also restore your service on the Backup detail page by clicking the name of the backup that you'd like to use, and then clicking Restore.

  5. Select a restore option:

    • Restore metastore data

      Only restores the data content stored in the backup.

    • Restore metastore data and service configuration

      Restores the data content stored in the backup, and applies the service configuration stored in the backup to the current service.

  6. Click Restore to update the service.

  7. Verify that you have returned to the Service detail page, and that your restore appears under the Restore history on the Backup/Restore tab.


  1. Run the following gcloud metastore services restore command to restore metadata into a service:

    gcloud metastore services restore SERVICE  \
        --location=LOCATION \
        --backup=BACKUP \

    Replace the following:

    • SERVICE: The name of the service.
    • LOCATION: The location of the service.
    • BACKUP: Refers to the backup resource to restore from. This can be the backup's ID, fully-qualified URL, or relative name.
    • RESTORE_TYPE: The type of restore to perform. Defaults to metadata-only.
    • PROJECT_ID: The project of the service.
  2. Verify that the restoration was successful.


Follow the API instructions to restore metadata into a service by using the API Explorer.

When the restore succeeds, the service automatically enters active state. If it fails, then the service rolls back to its previous healthy state.

To view a service's restore history, refer to the Backup/Restore tab on the Service detail page in the Google Cloud console.

Restore caveats

  • Dataproc Metastore service labels and actual data in the datawarehouse directory are not restored.

  • You can only restore metadata from backups created from Dataproc Metastore services in the same project and region as the target service.

    • You can use the Google Cloud CLI or REST API method to restore metadata from a cross-service backup.
  • Restoring from a backup doesn't restore or replace fine-grained IAM policies.

  • A history of past restores is available on the UI. Deleting the service itself deletes all restore history under that service.

Common failures

  • The user restoring the Dataproc Metastore service from a backup doesn't have and metastore.backups.use permissions.

What's next