Manage instance replication

This guide shows you how to use Filestore instance replication.

Before you begin

  1. Complete the setup steps needed to use Filestore. Quota for instances varies by project, region, and tier. Ensure you have enough to complete these tasks. For more information, see Quotas or Request a quota increase.

  2. If you haven't already done so, create a Filestore instance. In the context of this guide, this is the source instance.

Create an instance replica

Google Cloud console

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

    Go to Instances

  2. Click the instance ID of the instance you want to replicate.

  3. Click the Replications tab.

  4. Click Create replica.

  5. Click the documentation link to review the supported recovery point objective (RPO) and click Next.

  6. Enter all required fields and optional fields as needed.

    • The specified capacity must be greater than or equal to the source.
    • The following specifications must match the source instance:
    • For reduced risk of data loss, you are encouraged to choose a region and zone unique to the source.
  7. Click Next.

  8. Review the details and click Next.

  9. Click Create.

  10. Wait for the operation to complete. When finished, the replica will be listed under the source instance on the Instances page.

  11. Click the replica's instance ID to view its details.

gcloud

  1. You can create a replica instance by running the filestore instances create command.

    gcloud filestore instances create INSTANCE_ID \
        --source-instance=projects/PROJECT_ID/locations/LOCATION/instances/SOURCE_INSTANCE \
        --project=PROJECT_ID \
        --location=LOCATION \
        --network=name="NETWORK" \
        --tier=TIER \
        --file-share=name="FILE_SHARE_NAME",capacity=FILE_SHARE_SIZE \
    

Where:

REST API

Have gcloud CLI installed and initialized, which lets you generate an access token for the Authorization header.

  • Use cURL to call the Filestore API:

    curl -s \
      --header "Authorization: Bearer $(gcloud auth print-access-token)" \
      --header "Content-Type: application/json" \
      -d '{"tier": "TIER",
          "networks": { "network": "NETWORK" },
          "file_shares": {"name": "SHARE_NAME","capacity_gb": "CAPACITY"},
          "replication": {"replicas":[{"peer_instance": "projects/PROJECT/locations/ACTIVE_LOCATION/instances/ACTIVE_NAME"}], "role":"standby"},
          "description": "DESCRIPTION" }' \
      "https://file.googleapis.com/v1beta1/projects/PROJECT/locations/REPLICA_LOCATION/instances?instanceId=REPLICA_INSTANCE_NAME"
    

    Where:

  • View replica status

    Google Cloud console

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

      Go to Instances

    2. Click the instance ID of the replica you want to view.

    3. In the Description section, click the Replications tab.

    4. Here you can see the Replica status and Last synchronization point, a timestamp of the last time a full copy of your data was copied to the replica.

    gcloud

    1. To view information about a specific instance, run the instances describe command:

      gcloud filestore instances describe INSTANCE_ID \
          --project=PROJECT_ID \
          --location=LOCATION \
      

    Where:

    REST API

    Have gcloud CLI installed and initialized, which lets you generate an access token for the Authorization header.

  • Use cURL to call the Filestore API:

    curl -s \
      --header "Authorization: Bearer $(gcloud auth print-access-token)" \
      --header "Content-Type: application/json" \
      GET "https://file.googleapis.com/v1beta1/projects/PROJECT/locations/LOCATION/instances/INSTANCE_NAME"

    Where:

  • List all replicas in a project

    Google Cloud console

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

      Go to Instances

      Replicas are listed under their associated source instances.

    gcloud

    1. To see a list of all instances in the project, run the instances list command:

      gcloud filestore instances list
          --project=PROJECT-ID \
      

      Where:

      • PROJECT-ID with the project ID of the project you want to view.

      The response returns a list of instances and replicas, similar to the following:

      INSTANCE_NAME                       LOCATION     TIER      CAPACITY_GB  FILE_SHARE_NAME  IP_ADDRESS     STATE  CREATE_TIME
      genomics-source-1                   us-east1-b   ZONAL     1024         vol1             172.27.220.2   READY  2024-06-17T22:17:26
      genomics-source-1-replica           us-west1-a   ZONAL     1024         vol1             10.142.57.194  READY  2024-06-17T23:47:19
      

    REST API

    Have gcloud CLI installed and initialized, which lets you generate an access token for the Authorization header.

  • Use cURL to call the Filestore API:

    curl -s \
      --header "Authorization: Bearer $(gcloud auth print-access-token)" \
      --header "Content-Type: application/json" \
      GET "https://file.googleapis.com/v1/projects/PROJECT/locations/LOCATION/instances"

    Where:

  • Pause replication

    Google Cloud console

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

      Go to Instances

    2. Click the instance ID of the replica you want to use.

    3. In the Description section, click the Replications tab.

    4. In the Active instance details section, click Pause replication

    5. Read the alert before continuing and confirm by clicking Pause replication.

    The replication status changes to Pausing. After the operation is finished, the Replication Status changes to Paused and displays the date when the replica was paused.

    gcloud

    You can pause a replica instance by running the gcloud filestore instances pause-replica command.

      gcloud filestore instances pause-replica INSTANCE_ID \
          --project=PROJECT_ID \
          --location=LOCATION \
    

    Where:

    When successfully completed, the following response or similar is returned:

    createTime: '2025-12-22T14:03:33.727531128Z'
    customPerformanceSupported: true
    description: Replica of active, us-east1-b
    fileShares:
    - capacityGb: '1024'
      name: share
    name: projects/genomics-project/locations/us-west2-a/instances/my-replica
    networks:
    - connectMode: DIRECT_PEERING
      ipAddresses:
      - 10.229.150.130
      modes:
      - MODE_IPV4
      network: default
      reservedIpRange: 10.229.150.128/26
    performanceLimits:
      maxIops: '12000'
      maxReadIops: '12000'
      maxReadThroughputBps: '125829120'
      maxWriteIops: '4000'
      maxWriteThroughputBps: '104857600'
    protocol: NFS_V3
    replication:
      replicas:
      - peerInstance: projects/genomics-project/locations/us-east1-b/instances/my-source
        state: PAUSED
        stateUpdateTime: '2025-12-22T14:24:27.558413891Z'
      role: STANDBY
    state: READY
    tier: REGIONAL
    

    REST API

    Have gcloud CLI installed and initialized, which lets you generate an access token for the Authorization header.

  • Use cURL to call the Filestore API:

    curl -s \
      --header "Authorization: Bearer $(gcloud auth print-access-token)" \
      --header "Content-Type: application/json" \
      -d '{}' "https://file.googleapis.com/v1beta1/projects/PROJECT/locations/LOCATION/instances/REPLICA_NAME:pauseReplica"

    Where:

  • Resume replication

    Google Cloud console

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

      Go to Instances

    2. Click the instance ID of the replica you want to use.

    3. In the Description section, click the Replications tab.

    4. In the Active instance details section, click Resume replication

    5. Read the alert before continuing and confirm by entering resume in the provided field.

    The replication status changes to Resuming. After the operation is finished, the Replication Status is changed to Ready.

    gcloud

    You can resume a replica instance by running the gcloud filestore instances resume-replica command.

      gcloud filestore instances resume-replica INSTANCE_ID \
          --project=PROJECT_ID \
          --location=LOCATION \
    

    Where:

    When successfully completed, the following response or similar is returned:

    createTime: '2025-12-22T14:03:33.727531128Z'
    customPerformanceSupported: true
    description: Replica of active, us-central1
    fileShares:
    - capacityGb: '1024'
      name: share
    name: projects/genomics-project/locations/us-central1/instances/my-replica
    networks:
    - connectMode: DIRECT_PEERING
      ipAddresses:
      - 10.229.150.130
      modes:
      - MODE_IPV4
      network: default
      reservedIpRange: 10.229.150.128/26
    performanceLimits:
      maxIops: '12000'
      maxReadIops: '12000'
      maxReadThroughputBps: '125829120'
      maxWriteIops: '4000'
      maxWriteThroughputBps: '104857600'
    protocol: NFS_V3
    replication:
      replicas:
      - peerInstance: projects/genomics-project/locations/us-central1/instances/my-source
        state: READY
        stateUpdateTime: '2025-12-22T14:24:27.558413891Z'
      role: STANDBY
    state: READY
    tier: REGIONAL
    

    REST API

    Have gcloud CLI installed and initialized, which lets you generate an access token for the Authorization header.

  • Use cURL to call the Filestore API:

    curl -s \
      --header "Authorization: Bearer $(gcloud auth print-access-token)" \
      --header "Content-Type: application/json" \
      -d '{}' "https://file.googleapis.com/v1beta1/projects/PROJECT/locations/LOCATION/instances/REPLICA_NAME:resumeReplica"

    Where:

  • Break replication and promote replica

    In this section, you'll break replication between the active and standby instances. This action promotes the replica to a regular instance.

    Google Cloud console

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

      Go to Instances

    2. Click the instance ID of the replica you want to use.

    3. Click Break replication.

    4. Read the alert before continuing.

      Breaking replication will permanently stop data synchronization and convert both the active and standby instances into regular instances. Any changes made after the last recorded synchronization point won't be replicated. This action is irreversible.

    5. Enter the instance ID of the replica, then click Break replication.

    6. Wait for the operation to successfully complete.

    gcloud

    You can promote a replica instance by running the gcloud filestore instances promote-replica command.

      gcloud filestore instances promote-replica INSTANCE-ID \
          --project=PROJECT-ID \
          --location=LOCATION \
    

    Where:

    When successfully completed, the following response or similar is returned:

    capacityGb: '1024'
    capacityStepSizeGb: '256'
    createTime: '2024-06-20T17:11:56.048062134Z'
    fileShares:
    - capacityGb: '1024'
      name: vol1
    maxCapacityGb: '9984'
    maxShareCount: '1'
    name: projects/genomics-project/locations/us-west2-a/instances/my-replica
    networks:
    - connectMode: DIRECT_PEERING
      ipAddresses:
      - 10.155.90.194
      network: default
      reservedIpRange: 10.155.90.192/26
    protocol: NFS_V3
    replication:
      replicas:
      - lastActiveSyncTime: '2024-06-21T00:13:23Z'
        peerInstance: projects/genomics-project/locations/us-east1-b/instances/my-source
      role: STANDBY
    satisfiesPzi: true
    state: PROMOTING
    tier: ZONAL
    

    REST API

    Have gcloud CLI installed and initialized, which lets you generate an access token for the Authorization header.

  • Use cURL to call the Filestore API:

    curl -s \
      --header "Authorization: Bearer $(gcloud auth print-access-token)" \
      --header "Content-Type: application/json" \
      -d '{}' "https://file.googleapis.com/v1beta1/projects/PROJECT/locations/LOCATION/instances/REPLICA_NAME:promoteReplica"

    Where:

  • Delete a replica instance

    Google Cloud console

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

      Go to Instances

      Replicas are listed under their associated source instances. If you don't see a replica, see the gcloud commands for this task.

    2. Click the instance ID of the instance you want to delete.

    3. Click Delete.

    gcloud

    1. To see a list of all instances, including replicas, in the project, run the instances list command:

      gcloud filestore instances list
          --project=PROJECT_ID \
      

      Where:

      • PROJECT_ID with the project ID of the project you want to view.
    2. Copy the details of the instance you want to delete.

    3. You can delete an instance by running the filestore instances delete command.

      gcloud filestore instances delete INSTANCE_ID \
          --location=LOCATION \
      

    Where:

    REST API

    Have gcloud CLI installed and initialized, which lets you generate an access token for the Authorization header.

  • Use cURL to call the Filestore API:

    curl -s \
      --header "Authorization: Bearer $(gcloud auth print-access-token)" \
      --header "Content-Type: application/json" \
      --request DELETE "https://file.googleapis.com/v1beta1/projects/PROJECT/locations/LOCATION/instances/INSTANCE_NAME"

    Where:

  • Monitor instance replication

    Google Cloud console

    To see Filestore instance replication metrics in a Cloud Monitoring dashboard, follow these steps:

    1. Before you begin, make sure you have access to the following roles:

      • Monitoring Viewer
      • Monitoring Editor

      To see how to grant access to these roles, see Grant access to Cloud Monitoring.

    2. In the Google Cloud console, go to the  Metrics explorer page:

      Go to Metrics explorer

      If you use the search bar to find this page, then select the result whose subheading is Monitoring.

    3. Click the Select a metric expandable section.

    4. In the Filter by resource or metric name field, type filestore and select the Filestore Instance expandable section.

    5. Select the Instance expandable section and then click RPO.

    6. The RPO metric times_since_last_replication is displayed. This metric becomes available several minutes after the initial synchronization of replicated data completes.

    What's next