Manage Asynchronous Replication

This document describes how to start and stop Asynchronous Replication.

Asynchronous Replication is useful for low-RPO, low-RTO disaster recovery. To learn more about asynchronous replication, see About Asynchronous Replication.

Limitations

  • A primary disk can only replicate to one secondary disk at a time.
  • After replication stops, you can't resume replication to the same disk. You must create a new secondary disk and restart replication.
  • Secondary disks can't be attached, deleted, or snapshotted while they are in the process of replication.
  • If you use a regional disk as a secondary disk and a zonal outage occurs in one of the secondary disk's zones, replication from the primary disk to the secondary disk fails.

Before you begin

Start replication

Start replication using the Google Cloud console, Google Cloud CLI, REST, or Terraform.

Console

  1. In the Google Cloud console, go to the Asynchronous replication page.

    Go to Asynchronous replication

  2. Click the name of the secondary disk that you want to start replication to.

  3. Click Start replication. The Start replication window opens.

  4. Click Start replication.

gcloud

Start replication using the gcloud compute disks start-async-replication command:

gcloud compute disks start-async-replication PRIMARY_DISK_NAME \
    --PRIMARY_LOCATION_FLAG=PRIMARY_LOCATION \
    --secondary-disk=SECONDARY_DISK_NAME \
    --SECONDARY_LOCATION_FLAG=SECONDARY_LOCATION \
    --secondary-disk-project=SECONDARY_PROJECT

Replace the following:

  • PRIMARY_DISK_NAME: the name of the primary disk.
  • PRIMARY_LOCATION_FLAG: the location flag for the primary disk. For regional disks, use --region. For zonal disks, use --zone.
  • PRIMARY_LOCATION: The primary disk's region or zone. For regional disks, use the region. For zonal disks, use the zone.
  • SECONDARY_DISK_NAME: the name of the secondary disk.
  • SECONDARY_LOCATION_FLAG: the location flag for the secondary disk. For regional disks, use --secondary-disk-region. For zonal disks, use --secondary-disk-zone.
  • SECONDARY_LOCATION: the secondary disk's region or zone. For regional disks, use the region. For zonal disks, use the zone.
  • SECONDARY_PROJECT: the project that contains the secondary disk.

Go

Java

Node.js

Python

REST

Start replication using one of the following methods:

  • Start replication for zonal disks using the disks.startAsyncReplication method:

    POST https://compute.googleapis.com/compute/v1/projects/PRIMARY_DISK_PROJECT/zones/PRIMARY_LOCATION/disks/PRIMARY_DISK_NAME/startAsyncReplication
    
    {
    "asyncSecondaryDisk": "projects/SECONDARY_DISK_PROJECT/SECONDARY_LOCATION_PARAMETER/SECONDARY_LOCATION/disks/SECONDARY_DISK_NAME"
    }
    
  • Start replication for regional disks using the regionDisks.startAsyncReplication method:

    POST https://compute.googleapis.com/compute/v1/projects/PRIMARY_DISK_PROJECT/regions/PRIMARY_LOCATION/regionDisks/PRIMARY_DISK_NAME/startAsyncReplication
    
    {
    "asyncSecondaryDisk": "projects/SECONDARY_DISK_PROJECT/SECONDARY_LOCATION_PARAMETER/SECONDARY_LOCATION/disks/SECONDARY_DISK_NAME"
    }
    

Replace the following:

  • PRIMARY_DISK_PROJECT: the project that contains the primary disk.
  • PRIMARY_LOCATION: The primary disk's region or zone. For regional disks, use the region. For zonal disks, use the zone.
  • PRIMARY_DISK_NAME: the name of the primary disk.
  • SECONDARY_DISK_PROJECT: the project that contains the secondary disk.
  • SECONDARY_LOCATION_PARAMETER: the location parameter for the secondary disk. For regional disks, use regions. For zonal disks, use zones.
  • SECONDARY_LOCATION: The secondary disk's region or zone. For regional disks, use the region. For zonal disks, use the zone.
  • SECONDARY_DISK_NAME: the name of the secondary disk.

Terraform

To start replication between primary and secondary disks, use the compute_disk_async_replication resource.

To learn how to apply or remove a Terraform configuration, see Basic Terraform commands.

Stop replication

You can stop replication for a single primary or secondary disk, or for all disks in a consistency group. If you stop replication for a single disk in a consistency group, the replication time for that disk becomes out of sync with the other disks in the consistency group.

Stopping replication is performed in failover and failback scenarios. If you stop replication, you can't restart replication to the same secondary disk. If you want to restart replication, you must create a new secondary disk and start again.

When you stop replication on a disk, the disk's replication state changes to STOPPED. The replication state of the other disk in the disk's replication pair (the corresponding primary or secondary disk) updates to STOPPED at a later time. If you want to avoid the time gap and update the replication state of the other disk to STOPPED immediately, you must manually stop replication on the other disk as well. Stopping replication on both disks doesn't affect the time at which replication stops, it only affects the disks' replication states.

Stop replication for a single disk

Stop replication for a single disk using the Google Cloud console, the Google Cloud CLI, or REST.

Console

Stop replication by doing the following:

  1. In the Google Cloud console, go to the Asynchronous replication page.

    Go to Asynchronous replication

  2. Click the name of primary or secondary disk for which you want to stop replication. The Manage disk page opens.

  3. Click Terminate replication. The Terminate replication window opens.

  4. Click Terminate replication.

gcloud

Stop replication using the gcloud compute disks stop-async-replication command:

gcloud compute disks stop-async-replication DISK_NAME \
    --LOCATION_FLAG=LOCATION

Replace the following:

  • DISK_NAME: the name of the disk.
  • LOCATION_FLAG: the location flag for the disk. For a regional disk, use --region. For a zonal disk, use --zone.
  • LOCATION: the disk's region or zone. For regional disks, use the region. For zonal disks, use the zone.

Go

Java

Node.js

Python

REST

Stop replication using one of the following methods:

  • Stop replication for zonal disks using the disks.stopAsyncReplication method:

    POST https://compute.googleapis.com/compute/v1/projects/PROJECT/zones/LOCATION/disks/DISK_NAME/stopAsyncReplication
    {
    }
    
  • Stop replication for regional disks using the regionDisks.stopAsyncReplication method:

    POST https://compute.googleapis.com/compute/v1/projects/PROJECT/regions/LOCATION/regionDisks/DISK_NAME/stopAsyncReplication
    {
    }
    

Replace the following:

  • PROJECT: the project that contains the disk.
  • DISK_NAME: the name of the disk.
  • LOCATION: the zone or region of the disk. For zonal disks, use the zone. For regional disks, use the region.

Terraform

To stop the replication on primary and secondary disks, remove the compute_disk_async_replication resource.

Stop replication for a consistency group

Stop replication for all disks in a consistency group using the Google Cloud console, the Google Cloud CLI, or REST.

Console

Stop replication for all disks in a consistency group by doing the following:

  1. In the Google Cloud console, go to the Asynchronous replication page.

    Go to Asynchronous replication

  2. Click the Consistency groups tab.

  3. Click the name of the consistency group for which you want to stop replication. The Manage consistency group page opens.

  4. Click Terminate replication. The Terminate replication window opens.

  5. Click Terminate replication.

gcloud

Stop replication for all disks in a consistency group using the gcloud compute disks stop-group-async-replication command:

gcloud compute disks stop-group-async-replication CONSISTENCY_GROUP \
--LOCATION_FLAG=LOCATION

Replace the following:

  • CONSISTENCY_GROUP: the URL of the consistency group. For example, projects/PROJECT/regions/REGION/resourcePolicies/CONSISTENCY_GROUP_NAME.
  • LOCATION_FLAG: the location flag for the disks in the consistency group. For regional disks, use --region. For zonal disks, use --zone.
  • LOCATION: the disk's region or zone. For regional disks, use the region. For zonal disks, use the zone.

Go

Java

Node.js

Python

REST

Stop replication for all disks in a consistency group using one of the following methods:

  • Stop replication for zonal disks using the disks.stopGroupAsyncReplication method:

    POST https://compute.googleapis.com/compute/v1/projects/PROJECT/zones/LOCATION/disks/stopGroupAsyncReplication
    {
    "resourcePolicy": "CONSISTENCY_GROUP"
    }
    
  • Stop replication for regional disks using the regionDisks.stopGroupAsyncReplication method:

    POST https://compute.googleapis.com/compute/v1/projects/PROJECT/regions/LOCATION/regionDisks/DISK_NAME/stopAsyncReplication
    {
    "resourcePolicy": "CONSISTENCY_GROUP"
    }
    

Replace the following:

  • DISK_NAME: the name of the disk
  • LOCATION: the zone or region of the disk. For zonal disks, use the zone. For regional disks, use the region.
  • CONSISTENCY_GROUP: the URL of the consistency group. For example, projects/PROJECT/regions/REGION/resourcePolicies/CONSISTENCY_GROUP_NAME.

What's next

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.