Stay organized with collections
Save and categorize content based on your preferences.
This page explains how to restore a Dataproc Metastore service
from a backup.
A backup is a snapshot of the configuration settings and metadata stored in
a Dataproc Metastore service. You can use the restore feature
to quickly set up a new Dataproc Metastore service with
the data previously saved in a backup.
To get the permissions that
you need to restore a Dataproc Metastore service from a backup,
ask your administrator to grant you the
following IAM roles:
To grant full control of Dataproc Metastore resources to complete a backup, either the:
To use the Cloud Storage object that stores scheduled backups:
Cloud Storage Object User (roles/storage.objectUser)
on the Dataproc Metastore service agent
These predefined roles contain
the permissions required to restore a Dataproc Metastore service from a backup. To see the exact permissions that are
required, expand the Required permissions section:
Required permissions
The following permissions are required to restore a Dataproc Metastore service from a backup:
To restore a metadata service:
metastore.services.restore, metastore.backups.use
When you restore a service from a backup, you can choose one of the
following options:
Restore all metadata and the configuration settings saved in the backup.
Restore all metadata, but don't restore the configuration settings saved in
the backup. Instead, your service retains your current configuration settings.
Configuration settings include Dataproc Metastore parameters
such as service name, port number, and network settings.
Metadata includes all the database and table information stored in a
Dataproc Metastore service.
Considerations
While a restore operation is running, you can't update your
service — for example, you can't change configuration settings. However, you
can still use your service for normal operations, such as using it to access
its metadata from attached Dataproc or self-managed clusters.
Dataproc Metastore labels aren't restored.
Data stored in the warehouse directory isn't restored.
Restoring from a backup doesn't restore or replace fine-grained
IAM policies.
Restoring from a scheduled backup requires that your backup is located in a
Cloud Storage bucket.
Restore from a backup
To restore a Dataproc Metastore service from a backup, complete
the following steps.
If you're using the Google Cloud console, you can only restore metadata from a
backup that was created in the same project and region as
your new service.
If you use the Google Cloud CLI or Dataproc Metastore APIs,
you can restore metadata from a backup created in a different project and
region (cross-service backup).
Console
In the Google Cloud console, open the Dataproc Metastore page:
SERVICE: the name of your
Dataproc Metastore service.
PROJECT_ID: the project ID of the Google Cloud
project your Dataproc Metastoreservice resides in.
LOCATION: the Google Cloud region that your
Dataproc Metastore service resides.
BACKUP: Optional: the identifier of the backup file
you're restoring from. This value can be the backup ID, a fully
qualified URL, or the relative name in the following format:
projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}.
RESTORE_TYPE: the type of restore operation
to perform.
Accepted values include metadata-only or full. The default value
is metadata-only.
BACKUP_LOCATION: Optional: The Cloud Storage
location of your scheduled backup.
For example: gs://my-bucket/path/to/location.
Verify that the restore operation was successful.
When the restore completes, Dataproc Metastore
automatically returns to the active state regardless of whether or
not the restore succeeded.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003eThis page outlines the process of restoring a Dataproc Metastore service using a previously created backup, which includes the service's configuration and metadata.\u003c/p\u003e\n"],["\u003cp\u003eRestoration can be done to either restore both metadata and configuration settings, or only metadata while retaining the current service configuration.\u003c/p\u003e\n"],["\u003cp\u003eRestoring a service requires specific IAM roles and permissions, including Dataproc Metastore Editor or Administrator, and Cloud Storage Object User roles.\u003c/p\u003e\n"],["\u003cp\u003eThe restore operation can be initiated through the Google Cloud console, the gcloud CLI, or via REST APIs, with cross-service backups supported through the CLI and APIs.\u003c/p\u003e\n"],["\u003cp\u003eDuring a restore operation, the service cannot be updated, although it remains usable for accessing metadata, and the restore history, viewable in the console, is limited to the last 25 restores.\u003c/p\u003e\n"]]],[],null,["# Restore Dataproc Metastore from a backup\n\nThis page explains how to restore a Dataproc Metastore service\nfrom a [backup](/dataproc-metastore/docs/backup-metadata).\n\nA backup is a snapshot of the configuration settings and metadata stored in\na Dataproc Metastore service. You can use the restore feature\nto quickly set up a new Dataproc Metastore service with\nthe data previously saved in a backup.\n\nBefore you begin\n----------------\n\n- [Enable Dataproc Metastore](/dataproc-metastore/docs/enable-service) in your project.\n- [Create a Dataproc Metastore service](/dataproc-metastore/docs/create-service).\n- [Back up a Dataproc Metastore service](/dataproc-metastore/docs/backup-metadata).\n\n### Required roles\n\n\nTo get the permissions that\nyou need to restore a Dataproc Metastore service from a backup,\n\nask your administrator to grant you the\nfollowing IAM roles:\n\n- To grant full control of Dataproc Metastore resources to complete a backup, either the:\n - [Dataproc Metastore Editor](/iam/docs/roles-permissions/metastore#metastore.editor) (`roles/metastore.editor`) on the metadata service.\n - [Dataproc Metastore Administrator](/iam/docs/roles-permissions/metastore#metastore.admin) (`roles/metastore.admin`) on the project.\n- To use the Cloud Storage object that stores scheduled backups: [Cloud Storage Object User](/iam/docs/roles-permissions/storage#storage.objectUser) (`roles/storage.objectUser`) on the Dataproc Metastore service agent\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nThese predefined roles contain\n\nthe permissions required to restore a Dataproc Metastore service from a backup. To see the exact permissions that are\nrequired, expand the **Required permissions** section:\n\n\n#### Required permissions\n\nThe following permissions are required to restore a Dataproc Metastore service from a backup:\n\n- To restore a metadata service: ` metastore.services.restore, metastore.backups.use`\n- To use the Cloud Storage object:\n - ` orgpolicy.policy.get `\n - ` resourcemanager.projects.get `\n - ` resourcemanager.projects.list `\n - ` storage.managedFolders.create `\n - ` storage.managedFolders.delete `\n - ` storage.managedFolders.get `\n - ` storage.managedFolders.list `\n - ` ``storage.multipartUploads.*`` `\n - ` storage.objects.create `\n - ` storage.objects.delete `\n - ` storage.objects.get `\n - ` storage.objects.list `\n - ` storage.objects.restore `\n - ` storage.objects.update`\n\n\nYou might also be able to get\nthese permissions\nwith [custom roles](/iam/docs/creating-custom-roles) or\nother [predefined roles](/iam/docs/roles-overview#predefined).\nFor more information about specific Dataproc Metastore roles and permissions, see [Dataproc Metastore IAM overview](/dataproc-metastore/docs/iam-and-access-control).\n\n\u003cbr /\u003e\n\nAbout restoring from a backup\n-----------------------------\n\nWhen you restore a service from a backup, you can choose one of the\nfollowing options:\n\n- Restore all metadata and the configuration settings saved in the backup.\n- Restore all metadata, but don't restore the configuration settings saved in\n the backup. Instead, your service retains your current configuration settings.\n\n *Configuration settings* include Dataproc Metastore parameters\n such as service name, port number, and network settings.\n *Metadata* includes all the database and table information stored in a\n Dataproc Metastore service.\n\n### Considerations\n\n- While a restore operation is running, you can't update your\n service --- for example, you can't change configuration settings. However, you\n can still use your service for normal operations, such as using it to access\n its metadata from attached Dataproc or self-managed clusters.\n\n- Dataproc Metastore labels aren't restored.\n\n- Data stored in the warehouse directory isn't restored.\n\n- Restoring from a backup doesn't restore or replace fine-grained\n IAM policies.\n\n- Restoring from a scheduled backup requires that your backup is located in a\n Cloud Storage bucket.\n\nRestore from a backup\n---------------------\n\nTo restore a Dataproc Metastore service from a backup, complete\nthe following steps.\n\n- If you're using the Google Cloud console, you can only restore metadata from a\n backup that was created in the same project and region as\n your new service.\n\n- If you use the Google Cloud CLI or Dataproc Metastore APIs,\n you can restore metadata from a backup created in a different project and\n region (cross-service backup).\n\n### Console\n\n1. In the Google Cloud console, open the **Dataproc Metastore** page:\n\n [Open Dataproc Metastore](https://console.cloud.google.com/dataproc/metastore/services)\n2. On the **Dataproc Metastore** page, click the name of the service\n you want to restore from a backup.\n\n The **Service detail** page opens.\n **Figure 1.** The Dataproc Metastore service detail page\n3. To view your backups, click the **Backup/Restore** tab.\n\n4. Select the backup you want to use. To do this, click the menu icon\n more_vert and select\n **Restore**.\n\n The **Restore** page opens.\n\n You can also restore your service on the **Backup detail** page.\n To do this, click the name of the backup and then click **Restore**.\n5. Select the appropriate restore operation:\n\n - **Restore metastore data**. Restores all metadata, but doesn't restore the configuration settings saved in the backup\n - **Restore metastore data and service configuration**. Restores all metadata and the all configuration settings saved in the backup.\n6. To update the service, click **Restore**.\n\n Return to the **Dataproc Metastore** page, and\n verify that your service was successfully backed up.\n\n When the restore completes, Dataproc Metastore\n automatically returns to the [active state](/dataproc-metastore/docs/reference/rest/v1/projects.locations.services?_gl=1*1qaoqiw*_ga*MTIzMTkxNzU5Ni4xNjYzNzk5NTI1*_ga_WH2QY8WWF5*MTY2MzgwMzk0MC4xOS4xLjE2NjM4MDQxNTAuMC4wLjA.#state) regardless of whether or\n not the restore succeeded.\n\n### gcloud CLI\n\n1. To restore a Dataproc Metastore service, run the\n following [`gcloud metastore services restore`](https://cloud.google.com/sdk/gcloud/reference/metastore/services/restore) command:\n\n ```\n gcloud metastore services restore SERVICE \\\n --project=PROJECT_ID \\\n --location=LOCATION \\\n --backup=BACKUP \\\n --restore-type=RESTORE_TYPE \\\n --backup-location=BACKUP_LOCATION\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eSERVICE\u003c/var\u003e: the name of your Dataproc Metastore service.\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID of the Google Cloud project your Dataproc Metastoreservice resides in.\n - \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: the Google Cloud region that your Dataproc Metastore service resides.\n - \u003cvar translate=\"no\"\u003eBACKUP\u003c/var\u003e: Optional: the identifier of the backup file you're restoring from. This value can be the backup ID, a fully qualified URL, or the relative name in the following format: `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.\n - \u003cvar translate=\"no\"\u003eRESTORE_TYPE\u003c/var\u003e: the type of restore operation to perform. Accepted values include `metadata-only` or `full`. The default value is `metadata-only`.\n - \u003cvar translate=\"no\"\u003eBACKUP_LOCATION\u003c/var\u003e: Optional: The Cloud Storage location of your scheduled backup. For example: `gs://my-bucket/path/to/location`.\n2. Verify that the restore operation was successful.\n\n When the restore completes, Dataproc Metastore\n automatically returns to the [active state](/dataproc-metastore/docs/reference/rest/v1/projects.locations.services?_gl=1*1qaoqiw*_ga*MTIzMTkxNzU5Ni4xNjYzNzk5NTI1*_ga_WH2QY8WWF5*MTY2MzgwMzk0MC4xOS4xLjE2NjM4MDQxNTAuMC4wLjA.#state) regardless of whether or\n not the restore succeeded.\n\n### REST\n\nFollow the API instructions to [restore metadata into a service](/dataproc-metastore/docs/reference/rest/v1/projects.locations.services/restore)\nby using the APIs Explorer.\n\nWhen the restore completes, Dataproc Metastore automatically\nreturns to the [active state](/dataproc-metastore/docs/reference/rest/v1/projects.locations.services?_gl=1*1qaoqiw*_ga*MTIzMTkxNzU5Ni4xNjYzNzk5NTI1*_ga_WH2QY8WWF5*MTY2MzgwMzk0MC4xOS4xLjE2NjM4MDQxNTAuMC4wLjA.#state) regardless of whether or not the restore\nsucceeded.\n\n### View restore history\n\nTo view the restore history of a Dataproc Metastore service in\nthe Google Cloud console, complete the following steps:\n\n1. In the Google Cloud console console, open the [Dataproc Metastore](https://console.cloud.google.com/dataproc/metastore/services) page.\n2. In the navigation bar, click **Backup/Restore**.\n\n Your restore history appears in a table under **Restore**.\n\n The history displays up to the latest 25 restores you completed.\n\n Deleting a Dataproc Metastore service also deletes all\n associated restore history.\n\nTroubleshoot common issues\n--------------------------\n\n- [The service agent or user account doesn't have necessary permissions](/dataproc-metastore/docs/troubleshooting#backup-restore-user-permissions).\n- For more help solving common troubleshooting issues, see [Backup and restore error scenarios](/dataproc-metastore/docs/troubleshooting#backup-and-restore-error-scenarios).\n\nWhat's next\n-----------\n\n- [Back up metadata from a service](/dataproc-metastore/docs/backup-metadata)\n- [Update and delete a service](/dataproc-metastore/docs/manage-service)\n- [Hive Metastore](/dataproc-metastore/docs/hive-metastore)"]]