You can use the instructions on this page to restore standard and enhanced backups to new or existing instances.
Before you begin
Ensure you have enabled the APIs for Filestore and Backup and DR Service. For the list of required roles and permissions, see Prerequisites for using Filestore Enhanced Backups.
Restore options for Basic instances
You can restore standard backups for Basic HDD and Basic SSD instances to new instances, source instances, or existing instances.
For detailed instructions on restoring data, see Restore data.
Restore a standard backup for Zonal, Regional, or Enterprise instance
You can restore standard backups for Zonal, Regional or Enterprise to new instances only.
To restore a standard backup follow these steps:
gcloud
To restore a Filestore file share to a new instance, run the
instances create command:
gcloud filestore instances create INSTANCE_NAME \
--zone=ZONE \
--tier=TIER \
--file-share=name=FILE_SHARE_NAME,capacity=FILE_SHARE_CAPACITY,source-backup=SOURCE_BACKUP_NAME,source-backup-region=SOURCE_BACKUP_LOCATION \
--network=name=VPC_NETWORK,reserved-ip-range=RESERVED_IP_ADDRESS
Where:
- INSTANCE_NAME is the name you want to give to the new Filestore instance.
- ZONE is the zone where the Filestore instance resides.
- TIER is the service tier you want to use. This should be the same as the source backup.
- FILE_SHARE_NAME is the name you specify for the NFS file share that is served from the instance.
- FILE_SHARE_CAPACITY is the capacity you want for the file share in GiB or TiB, depending on the instance type and your needs.
- SOURCE_BACKUP_NAME is the name of the backup to restore from.
- SOURCE_BACKUP_LOCATION is the region where the backup is located.
- VPC_NETWORK is the name of the VPC network you want the instance to use.
- RESERVED_IP_ADDRESS is the IP address range for the Filestore instance.
For gcloud flag details, see Create an instance.
Example
The following command creates a new Filestore instance myinstance-restored
located in zone us-central1-c on network default. Backup mybackup
located in region asia-east2 is restored on file share vol1 of
myinstance-restored with a 2TiB capacity:
gcloud filestore instances create myinstance-restored \
--zone=us-central1-c \
--tier=zonal \
--network=name=default \
--file-share=name=vol1,capacity=2TiB,source-backup=mybackup,source-backup-region=asia-east2
Restore an enhanced backup
You can only restore an enhanced backup to a new instance. To restore an enhanced backup, follow these steps:
gcloud
To restore a Filestore file share to a new instance, run the
instances create command:
gcloud filestore instances create INSTANCE_NAME \
--zone=ZONE \
--tier=TIER \
--file-share=name=FILE_SHARE_NAME,capacity=FILE_SHARE_CAPACITY,source-backupdr-backup=SOURCE_BACKUP_PATH
--network=name=VPC_NETWORK,reserved-ip-range=RESERVED_IP_ADDRESS \
Where:
- INSTANCE_NAME is the name you want to give to the new Filestore instance.
- ZONE is the zone where the Filestore instance resides.
- TIER is the service tier you want to use.
- FILE_SHARE_NAME is the name you specify for the NFS file share that is served from the instance.
- FILE_SHARE_CAPACITY is the capacity you want for the file share in GiB or TiB, depending on the instance type and your needs. The provisioned capacity of the new instance must be equal to or exceed the provisioned capacity of the source instance.
SOURCE_BACKUP_PATH is the full path to the backup that the instance is restored from. The path is in the following format:
projects/PROJECT_ID/locations/LOCATION/backupVaults/BACKUP_VAULT_NAME/dataSources/DATASOURCE_ID/backups/BACKUP_IDWhere:
- PROJECT_ID is the name of the project where the backup resides.
- LOCATION is the location of the backup.
- BACKUP_VAULT_NAME is the name of the backup vault.
- DATASOURCE_ID is ID of the data source.
- BACKUP_ID is the ID of the backup.
VPC_NETWORK is the name of the VPC network you want the instance to use.
RESERVED_IP_ADDRESS is the IP address range for the Filestore instance.
Example
The following command creates a new Filestore instance backupdr-instance-restored located in zone us-central1-a on the network default. The backup is restored on file share vol1 of
backupdr-instance-restored with a 1TiB capacity:
gcloud --project=gcbdr-project filestore instances create backupdr-instance-restored \
--zone=us-central1-a \
--tier=zonal \
--file-share=name="vol1",capacity=1024,source-backupdr-backup="projects/gcbdr-project/locations/us-central1/backupVaults/vault-1/dataSources/a11111bb222ccc333ddd4444eee555555f6666/backups/00aaab11-2222-3333-c444-d5ddd555555d" \
--network=name="default" \
Restore a Filestore instance from a backup vault
To restore a Filestore instance from a backup vault in the Google Cloud follow the instructions in Restore a Filestore instance from a backup vault in the Google Cloud.
What's next
- Learn how to back up data with standard on-demand backups.
- Learn how to back up data with enhanced on-demand backups.
- Learn how to create backup vaults and plans with Backup and DR Service.