Back up data for disaster recovery  |  Filestore  |  Google Cloud (2024)

This page shows you how to back up data for disaster recovery usingFilestore backups. To learn more about backups, common use cases,and best practices, see Backups.

Supported tiers

The following table shows the Filestore service tiersthat support backups, encryption, and related restoreoperations:

TierBackups
support
restore to
new instance
restore to
existing instance
restore to
source instance
CMEK
support
Basic HDDYesYesYesYesNo
Basic SSDYesYesYesYesNo
ZonalYesYesNoNoYes
RegionalYesYesNoNoYes
EnterpriseYesYesNoNoYes

Before you begin

  1. Install gcloud.

  2. Update gcloud components:

    gcloud components update
  3. Ensure that the account you are using has either the Cloud Filestore Editorrole, or the Project Owner or Project Editor basic role. For more informationabout roles and permissions for Filestore, seeAccess Control,IAM permissions, orAbout supported protocols.

Filestore backups don't include file locksand certain instance-specific information.The following table shows what information backups preserve and what informationthey don't:

PreservedNot preserved
Instance IDDescription
Tier of the source instanceLocation
CapacityNetwork
File share nameIP address
Creation time
IP-based access controls
File locks
Lock state
Snapshots

Backup chains and encryption

A backup chain is a collection ofbackups that reference the same source instance. Even if stored in a regionseparate from the source, a backup chain is collectively located in its ownbucket and region, and, if applicable, each backup in the chain is encryptedusing the same CMEK. All service tiers support multiple backup chains.

When creating a backup chain encrypted with CMEK, consider the followinglimitations:

  • CMEK support is not available for basic HDD and basic SSD backups.

  • A single CMEK is applied to the bucket where the backup chain is stored andcannot be combined or replaced.

For more information see Customer-managed encryption keysand Backups.

Create a backup

You can create a backup of a file share using one of the following methods:

Console

  1. Go to the Filestore instances page
  2. Click the Filestore instance that you want to create a backup of.
  3. Click the Backups tab.
  4. Click Create backup.
  5. For Backup ID, type a name for the backup.
  6. For Region, select the Google Cloud region where you want thebackup to be located.
  7. Optional: Add a description.
  8. Optional: Click Add label to add labels to the backup.
  9. Click Create.

gcloud

Run the following gcloud filestore backups createcommand in a terminal window on your local machine. The --kms-key flag isoptional:

 gcloud filestore backups create BACKUP-NAME \ --instance=INSTANCE-NAME \ --file-share=FILE-SHARE-NAME \ --instance-zone=ZONE \ --region=BACKUP-LOCATION \ --kms-key=projects/KMS-PROJECT/locations/KMS-LOCATION/keyRings/KEYRING/cryptoKeys/CRYPTO-KEY

where:

  • BACKUP-NAME is the name you want to give the backup.
  • INSTANCE-NAME is the name of the Filestore instance to back up.
  • FILE-SHARE-NAME is the name of the file share on the Filestore instance.
  • ZONE is the zone where the Filestore instance is located.
  • BACKUP-LOCATION is the region where the backup will be stored. Ifa region is not indicated, the backup is created in the same region as theFilestore instance.
  • KMS-PROJECT is the project name where the KMS key resource is stored.
  • KMS-LOCATION is the region of the KMS key resource.
  • KEYRING is the name of the key ring.
  • CRYPTO-KEY is the KMS key resource.

Example

The following command creates a backup of file share vol1 on the Filestoreinstance nfs-server, which is located in zone us-central1-c. The backup isnamed mybackup, is located in region asia-east2, and has an associatedencryption key that will encrypt the instance when restored:

 gcloud filestore backups create mybackup \ --instance=nfs-server \ --file-share=vol1 \ --instance-zone=us-central1-c \ --region=asia-east2 \ --kms-key=projects/purple-project/locations/us-central1/keyRings/filestore-keyring/cryptoKeys/filestore-key

List, view, update, and delete backups

Filestore backups can be listed, viewed, updated, and deleted.

Console

  1. To view a list of all backups in your current project:

    Go to the Filestore backups page

  2. To see details about a backup, click the backup ID.

  3. To delete a backup:

    1. Click the backup ID of the backup you want to delete.
    2. Click Delete.
    3. When prompted, type the backup ID.
    4. Click Delete.

gcloud

List all backups in your current project

To view a list of backups for your current project, run the backups listcommand:

 gcloud filestore backups list

View information about a backup

To view information about a backup, run the backups describecommand:

 gcloud filestore backups describe BACKUP-NAME \ --region=BACKUP-LOCATION

Where:

  • BACKUP-NAME is the name of the backup whose information you want to view.
  • BACKUP-LOCATION is the region where the backup is stored.

Update a backup

To update a backup, run the backups updatecommand:

gcloud filestore backups update BACKUP-NAME \ --region=BACKUP-LOCATION \ --description="NEW-DESCRIPTION" \ --update-labels=KEY=VALUE,...

Where:

  • BACKUP-NAME is the name of the backup whose information you want to view.
  • BACKUP-LOCATION is the region where the backup is stored. The region cannot be changed.
  • NEW-DESCRIPTION is the description of the backup.
  • KEY=VALUE,... is a list of KEY=VALUE pairs you want to update. If alabel exists, its value is updated, otherwise a new label is created.

Delete a backup

To delete a backup, run the backups deletecommand:

gcloud filestore backups delete BACKUP-NAME \ --region=BACKUP-LOCATION

Where:

  • BACKUP-NAME is the name of the backup whose information you want to view.
  • BACKUP-LOCATION is the region where the backup is stored.

Restore a file share

Before initiating a restore operation, we recommend pausing applications andunmounting from the file system to reduce the risk of application errors. Youmust then remount the file share after it is restored from a backup. Alloutstanding file locks are revoked upon successful restoration. Duringrestoration, client READ and WRITE operations are paused.

Limitations

  • Basic-tier backups can be restored to the source, a new instance, or to anexisting instance.

  • If you want to restore a backup of a zonal, regional,or enterprise instance, you must create a new instance.

  • When creating a new instance to complete a backup restore operation, the newinstance must match the source instance's service tier and capacity range. Forexample, if the source was created using the zonal service tier with lowercapacity range, the new instance must use the same service tier and capacityrange.

  • When restoring a backup, the new instance must use the same protocolas the source instance.

Before you begin

When restoring a backup to an existing instance, if the backup and the instanceuse separate customer-managed encryption keys (CMEKs),you'll need to grant access to the backup's key from the target instance'sproject-level service account.

gcloud

Ensure you have the proper permissions such as theroles/cloudkms.adminrole to run the following command:

 gcloud projects add-iam-policy-binding KMS_PROJECT_NUMBER \ --member serviceAccount:service-TARGET_INSTANCE_PROJECT_NUMBER@cloud-filer.iam.gserviceaccount.com \ --role roles/cloudkms.cryptoKeyEncrypterDecrypter

where:

  • KMS_PROJECT_NUMBER is the project number where the key islocated.
  • TARGET_INSTANCE_PROJECT_NUMBER is the project number for theinstance you want associated with the key.

For gcloud flag details, see the gcloud projects add-iam-policy-bindingpage.

Restore to the source or an existing instance

You can restore a basic tier backup to the source instance or to a fileshare of an existing Filestore instance.

When restoring a backup to an existing Filestore instance, thecapacity of the target instance must be greater than or equal to that of theoriginal instance from which the backup was created. If the original instancehas a greater capacity, you must first increase the target instance's capacitybefore attempting the restore operation.

If a backup restore to a basic HDD or basic SSD instance fails, the file sharestate remains unchanged.

If, once the operation begins, a backup restore to a zonal, regional, orenterprise instance fails, the file system resets to an empty state. Users areresponsible for retrying the operation.

Console

  1. Go to the Filestore instances page
  2. Click the instance ID of the instance you want to restore a backup from.
  3. Click the Backups tab.
  4. Locate the backup you want to restore from and click (...)More actions.
  5. Click Restore backup.
  6. Choose a target instance to restore:
    1. If restoring the source instance, click Source instance.
    2. If restoring to another existing instance, click Other existing instance.
      1. Click Select instance.
      2. Select the target instance where you want the restored backup toreside and click Select.
  7. Click Restore and a confirmation dialog appears.
    1. Click the acknowledgement checkbox.
    2. Enter the name of the backup in the input field and click Restore.

gcloud

To restore a Filestore file share to an existing instance, run theinstances restorecommand:

 gcloud filestore instances restore INSTANCE-NAME \ --source-backup=BACKUP-NAME \ --source-backup-region=BACKUP-LOCATION \ --file-share=FILE-SHARE-NAME \ --zone=INSTANCE-LOCATION

Where:

  • INSTANCE-NAME is the name of the existing Filestore instance to restore the file share to.
  • BACKUP-NAME is the name of the backup to restore from.
  • BACKUP-LOCATION is the region where the backup is located.
  • FILE-SHARE-NAME is the name of the file share to restore to.
  • INSTANCE-LOCATION is the zone that the Filestore instance is located.

Example

The following command restores mybackup, which is located in regionasia-east2, to file share vol1 on Filestore instancemyinstance, which is located in zone us-central1-c:

 gcloud filestore instances restore myinstance \ --source-backup=mybackup \ --source-backup-region=asia-east2 \ --file-share=vol1 \ --zone=us-central1-c

Restore to a new instance

When a backup is restored to a new Filestore instance, the capacity ofthe new file share must be greater than or equal to the capacity of the backup.For zonal, regional, and enterprise tier instances, the capacity of the new fileshare must be greater than or equal to the capacity of the source share.

You must use the same service tier as thesource backup.

Console

  1. In the Google Cloud console, go to the Filestore instances page.

    Go to the Filestore instances page

  2. Click Backups.

  3. Click the name of the backup you want to restore from.

  4. Click Restore.

  5. Click New instance.

  6. Configure the new instance by following the instructions on the page. For details, see Creating instances.

  7. Click Restore.

gcloud

To restore a Filestore file share to a new instance, run theinstances 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 sameas 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.
  • 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 Creating instances.

Example

The following command creates a new Filestore instance myinstance-restoredlocated in zone us-central1-c on network default. Backup mybackuplocated in region asia-east2 is restored on file share vol1 ofmyinstance-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

What's next

  • Learn how to schedule backups using Cloud Scheduler.
  • Learn more about backups, common use cases, and best practices.
  • Learn about backups pricing.
  • Learn how to set up alerts forlow disk space andlow backups quota.
  • Learn about backups-related known issues.
Back up data for disaster recovery  |  Filestore  |  Google Cloud (2024)
Top Articles
Hackers Compromised 8,000 Solana Wallets, Stole $5 Million
Log Levels Explained and How to Use Them | Xcitium
Fredatmcd.read.inkling.com
Tyson Employee Paperless
Aadya Bazaar
Comcast Xfinity Outage in Kipton, Ohio
Unraveling The Mystery: Does Breckie Hill Have A Boyfriend?
Craigslist Estate Sales Tucson
The Blind Showtimes Near Showcase Cinemas Springdale
Craigslist Chautauqua Ny
10 Great Things You Might Know Troy McClure From | Topless Robot
Notisabelrenu
Troy Athens Cheer Weebly
The Murdoch succession drama kicks off this week. Here's everything you need to know
Craigslist Pets Athens Ohio
Gma Deals And Steals Today 2022
25Cc To Tbsp
Everything We Know About Gladiator 2
Aspen Mobile Login Help
Alfie Liebel
Dover Nh Power Outage
Beverage Lyons Funeral Home Obituaries
Kcwi Tv Schedule
Dtlr Duke St
A Man Called Otto Showtimes Near Cinemark University Mall
California Online Traffic School
Ocala Craigslist Com
Rs3 Bring Leela To The Tomb
Evil Dead Rise Showtimes Near Regal Sawgrass & Imax
49S Results Coral
United E Gift Card
Franklin Villafuerte Osorio
Wells Fargo Bank Florida Locations
Davita Salary
Kelley Blue Book Recalls
Nearest Ups Office To Me
Www Craigslist Com Brooklyn
Mixer grinder buying guide: Everything you need to know before choosing between a traditional and bullet mixer grinder
Urban Blight Crossword Clue
What Is A K 56 Pink Pill?
RECAP: Resilient Football rallies to claim rollercoaster 24-21 victory over Clarion - Shippensburg University Athletics
Disassemble Malm Bed Frame
boston furniture "patio" - craigslist
Jammiah Broomfield Ig
Mauston O'reilly's
This Doctor Was Vilified After Contracting Ebola. Now He Sees History Repeating Itself With Coronavirus
Huntsville Body Rubs
Ihop Deliver
Craigs List Sarasota
Access One Ummc
Códigos SWIFT/BIC para bancos de USA
Latest Posts
Article information

Author: Annamae Dooley

Last Updated:

Views: 6072

Rating: 4.4 / 5 (45 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Annamae Dooley

Birthday: 2001-07-26

Address: 9687 Tambra Meadow, Bradleyhaven, TN 53219

Phone: +9316045904039

Job: Future Coordinator

Hobby: Archery, Couponing, Poi, Kite flying, Knitting, Rappelling, Baseball

Introduction: My name is Annamae Dooley, I am a witty, quaint, lovely, clever, rich, sparkling, powerful person who loves writing and wants to share my knowledge and understanding with you.