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.

Access to Backup and DR Service for Filestore is available by invitation only. If you'd like to request access to Backup and DR Service for Filestore in your Google Cloud project, contact your sales representative.

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.

Restore a Filestore instance

Use the following instructions to restore a Filestore instance.

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. Select the following restore options:

    • The selected instance is listed in Resource name.
    • In the Backup field, click Browse.
  4. Select the backup that you want to restore from and click Done.

  5. In the Restore project name field the current project is prepopulated, but you can Browse to another project and Select it.

  6. Click Continue.

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

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-gcbdr-backup=GCBDR_BACKUP_NAME,source-gcbdr-backup-region=GCBDR_BACKUP_REGION" \
      --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.
    • GCBDR_BACKUP_NAME: The name of the Backup and DR backup to restore from.
    • GCBDR_BACKUP_REGION: The region of the Backup and DR backup.
    • 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.