Managing turbo replication (original) (raw)

Skip to main content

Managing turbo replication

Overview

This page describes how to use the turbo replication feature on a dual-region bucket.

Required roles

In order to get the required permissions for using turbo replication, ask your administrator to grant you the Storage Admin (roles/storage.admin) IAM role on the bucket.

This predefined role contains the permissions required to use turbo replication. To see the exact permissions that are required, expand theRequired permissions section:

Required permissions

You might also be able to get these permissions with custom roles or otherpredefined roles.

For instructions on granting roles on buckets, seeSet and manage IAM policies on buckets.

To enable or disable turbo replication on an existing bucket, complete the following instructions:

Console

  1. In the Google Cloud console, go to the Cloud Storage Buckets page.
    Go to Buckets
  2. In the bucket list, click the name of the desired bucket.
  3. Click the Configuration tab.
  4. In the Replication row, clickEdit.
    The window that appears indicates whether you are about to Enable turbo replication or Disable turbo replication.
  5. Click Save to confirm the new setting.

Command line

Use the gcloud storage buckets update command with the --rpoflag:

gcloud storage buckets update gs://BUCKET_NAME --rpo=STATE

Where:

If successful, the response looks like:

Updating gs://my-bucket/... Completed 1

Client libraries

C++

For more information, see theCloud Storage C++ API reference documentation.

To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries.

The following sample enables turbo replication on a bucket:

The following sample enables default replication on a bucket:

C#

For more information, see theCloud Storage C# API reference documentation.

To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries.

The following sample enables turbo replication on a bucket:

The following sample enables default replication on a bucket:

Go

For more information, see theCloud Storage Go API reference documentation.

To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries.

The following sample enables turbo replication on a bucket:

The following sample enables default replication on a bucket:

Java

For more information, see theCloud Storage Java API reference documentation.

To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries.

The following sample enables turbo replication on a bucket:

The following sample enables default replication on a bucket:

Node.js

For more information, see theCloud Storage Node.js API reference documentation.

To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries.

The following sample enables turbo replication on a bucket:

The following sample enables default replication on a bucket:

PHP

For more information, see theCloud Storage PHP API reference documentation.

To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries.

The following sample enables turbo replication on a bucket:

The following sample enables default replication on a bucket:

Python

For more information, see theCloud Storage Python API reference documentation.

To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries.

The following sample enables turbo replication on a bucket:

The following sample enables default replication on a bucket:

Ruby

For more information, see theCloud Storage Ruby API reference documentation.

To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries.

The following sample enables turbo replication on a bucket:

The following sample enables default replication on a bucket:

REST APIs

JSON API

  1. Have gcloud CLI installed and initialized, which lets you generate an access token for the Authorization header.
  2. Create a JSON file that contains the following information:
    {
    "rpo": "STATE"
    }
    Where STATE is ASYNC_TURBO for enabling Turbo Replication or DEFAULT for disabling Turbo Replication.
  3. Use cURL to call the JSON API with aPATCH Bucket request:
    curl -X PATCH --data-binary @JSON_FILE_NAME \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    -H "Content-Type: application/json" \
    "https://storage.googleapis.com/storage/v1/b/BUCKET_NAME?fields=rpo"
    Where:
    • JSON_FILE_NAME is the path for the JSON file that you created in Step 2.
    • BUCKET_NAME is the name of the relevant bucket. For example, my-bucket.
      If the request is successful, no response is returned.

XML API

This feature cannot be managed through the XML API. Use the JSON API instead.

Check a bucket's replication status

To check the recovery point objective (RPO) or replication status of a bucket, complete the following instructions:

Console

  1. In the Google Cloud console, go to the Cloud Storage Buckets page.
    Go to Buckets
  2. In the bucket list, click the name of the bucket you want to verify.
  3. Click the Configuration tab.
  4. If turbo replication is enabled on the bucket, Replication is set toTurbo.

Command line

Use the gcloud storage buckets describe command with the--format flag:

gcloud storage buckets describe gs://BUCKET_NAME --format="default(rpo)"

Where:

If successful, the response looks like the following example:

rpo: ASYNC_TURBO

Client libraries

C++

For more information, see theCloud Storage C++ API reference documentation.

To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries.

C#

For more information, see theCloud Storage C# API reference documentation.

To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries.

Go

For more information, see theCloud Storage Go API reference documentation.

To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries.

Java

For more information, see theCloud Storage Java API reference documentation.

To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries.

Node.js

For more information, see theCloud Storage Node.js API reference documentation.

To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries.

PHP

For more information, see theCloud Storage PHP API reference documentation.

To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries.

Python

For more information, see theCloud Storage Python API reference documentation.

To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries.

Ruby

For more information, see theCloud Storage Ruby API reference documentation.

To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries.

REST APIs

JSON API

  1. Have gcloud CLI installed and initialized, which lets you generate an access token for the Authorization header.
  2. Use cURL to call the JSON APIwith a GET Bucket request:
    curl -X GET \
    -H "Authorization: Bearer $(gcloud auth print-access-token)" \
    "https://storage.googleapis.com/storage/v1/b/BUCKET_NAME?fields=rpo"
    Where BUCKET_NAME is the name of the relevant bucket. For example, my-bucket.
    The response looks like the following example:
    {
    "name": "my-bucket",
    "projectNumber": "234...",
    ...
    "rpo": "ASYNC_TURBO"
    }
    Notice the rpo key. The value ASYNC_TURBO indicates that turbo replication is enabled. DEFAULT indicates that default replication is applied. The rpo field is always present for dual- and multi-region buckets, but is absent from single-region buckets.

XML API

This feature cannot be managed through the XML API. Use the JSON API instead.

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 2025-12-09 UTC.