Restore a Filestore instance from a backup vault

This page helps you to restore a Filestore instance from a backup vault in the Google Cloud console.

Before you begin

  • Grant the following IAM roles for the user who performs the restore in the backup vault project.

    • Backup and DR Restore User (roles/backupdr.restoreUser) for both backup vault.
    • Filestore Editor (roles/file.editor) for only the target.

    These predefined roles contain the permissions required to access the backup vault in the Filestore project. For specific permissions, see the following list.

    • backupdr.bvbackups.useReadOnlyForFilestoreInstance
    • backupdr.backupVaults.get
    • backupdr.backupVaults.list
    • backupdr.bvbackups.list
    • backupdr.bvdataSources.get
    • backupdr.bvdataSources.list
    • backupdr.bvbackups.get

    To restore an instance, a user must have the following permissions:

    • backupdr.bvbackups.useReadOnlyForFilestoreInstance on the backup resource.

    • file.instances.create on the target project where the instance will be restored.

For more information about granting roles, see Manage access to projects, folders, and organizations.

Considerations

  • By default, a Filestore instance restored from a CMEK-encrypted backup will be restored as a GMEK instance unless a CMEK key is specified during restore.

  • Because Cloud Key Management Service keys are regional, when you create a new instance and restore a backup to a different region, you must provide a different Cloud Key Management Service key from that target region. This does not apply when restoring to an existing instance.

  • Backups can be restored even if the original workload project is deleted, because decryption permissions are anchored to the Backup and DR service agent (P4SA) in the vault project.

Limitations

  • Cross-project restore monitoring: Backup and DR doesn't support monitoring cross-project Filestore restores. If you restore a Filestore backup to a different project, the restore operation runs, but its progress and completion status don't appear in the Backup and DR Jobs page in the vault project. To check the status of a cross-project restore, go to the target project and check the status of the Filestore instance.

  • Regional availability for restore monitoring: you can monitor restore jobs only in regions where both Filestore and Backup and DR are available.

Restore a Filestore instance

Use the following instructions to restore a Filestore instance. You can check the status of the restore job from the Jobs page. For more information, see Monitor backup and restore jobs in Google Cloud console.

Console

  1. In the Google Cloud console, go to the Vaulted backups page.

    Go to Vaulted backups

    All Filestore instances with vaulted backups are listed here.

  2. Select the instance to restore and click the action icon to select the Restore action. The Restore page appears.

  3. On the Restore page, verify that the instance you want to restore is listed in the Resource name field.

  4. In the Backup field, click Browse.

  5. Select the backup that you want to restore from and click Done.

  6. In the Restore project name field the current project is prepopulated, but you can click Browse to choose another project.

  7. Click Continue.

    • The Restore backup to a new instance page appears. The instance properties are pre-populated based on the source instance properties. You can modify the properties of the new instance.
  8. Click Restore to create a new Filestore instance from the selected backup.

  9. To view the status of the restore job, go to the Backup and DR Jobs page.

    Go to Jobs

gcloud

  1. To get the backup vault service account, use the following command.

    gcloud backup-dr backup-vaults describe BACKUPVAULT_NAME \
        --location=LOCATION
    

    Replace the following:

    • BACKUPVAULT_NAME: the backup vault name you want to restore data from.
    • LOCATION: the location of the backup vault.
  2. To restore a Filestore instance, use the following commands.

    The restore command is run from the Filestore service.

    gcloud filestore instances create INSTANCE_NAME \
      --file-share="capacity=CAPACITY,name=SHARE_NAME,source-backupdr-backup=BACKUPDR_BACKUP_FULL_PATH" \
      --network="name=default" \
      --location=LOCATION \
      --project=PROJECT_NAME \
      --tier=TIER
    

    Replace the following:

    • INSTANCE_NAME: The name of the Filestore instance to create.
    • CAPACITY: The capacity of the file share.
    • SHARE_NAME: The name of the file share.
    • BACKUPDR_BACKUP_FULL_PATH: The full path of the Backup and DR backup to restore from.
    • LOCATION: The location to create the Filestore instance in.
    • PROJECT_NAME: The project to create the Filestore instance in.
    • TIER: The tier of the Filestore instance.

Monitor restore jobs

When you restore a Filestore instance, Backup and DR automatically tracks the job. You can monitor the progress and status of the job in the Google Cloud console.

To view the progress and status of the restore job:

  1. In the Google Cloud console, go to the Backup and DR Jobs page.

    Go to Jobs

  2. Look for the job with the Resource type set to Filestore and Job category set to Restore.

You can view restore job logs in the backup vault project where the backup is stored. You can view the details of a job on the Backup and DR Jobs page and in Cloud Logging.

For more information, see Monitor backup and restore jobs in Google Cloud console.

What's next