Managing turbo replication Stay organized with collections Save and categorize content based on your preferences.
This page describes how to use theturbo replication feature on adual-region bucket.
Required roles
In order to get the required permissions for using turbo replication, ask youradministrator to grant you the Storage Admin(roles/storage.admin) IAM role on the bucket.
This predefined role contains the permissions required to use turboreplication. To see the exact permissions that are required, expand theRequired permissions section:
Required permissions
storage.buckets.getstorage.buckets.updatestorage.buckets.list- This permission is only required if you plan on using theGoogle Cloud console to perform the instructions on this page.
You might also be able to get these permissions withcustom roles or otherpredefined roles.
For instructions on granting roles on buckets, seeSet and manage IAM policies on buckets.
Set turbo replication
To enable or disable turbo replication on an existing bucket, complete thefollowing instructions:
Console
- In the Google Cloud console, go to the Cloud StorageBuckets page.
In the bucket list, click the name of the desired bucket.
Click theConfiguration tab.
In theReplication row, clickEdit.
The window that appears indicates whether you are about toEnableturbo replication orDisable turbo replication.
ClickSave to confirm the new setting.
Command line
Use thegcloud storage buckets update command with the--rpoflag:
gcloud storage buckets update gs://BUCKET_NAME --rpo=STATE
Where:
BUCKET_NAMEis the name of the relevantbucket. For example,my-bucket.STATEisASYNC_TURBOfor enabling TurboReplication orDEFAULTfor disabling Turbo Replication.
If successful, the response looks like:
Updating gs://my-bucket/... Completed 1
Client libraries
For more information, see theCloud StorageC++ 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: For more information, see theCloud StorageC# 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: For more information, see theCloud StorageGo 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: For more information, see theCloud StorageJava 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: For more information, see theCloud StorageNode.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: For more information, see theCloud StoragePHP 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: For more information, see theCloud StoragePython 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: For more information, see theCloud StorageRuby 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++
namespacegcs=::google::cloud::storage;using::google::cloud::StatusOr;[](gcs::Clientclient,std::stringconst&bucket_name){autoupdated=client.PatchBucket(bucket_name,gcs::BucketMetadataPatchBuilder().SetRpo(gcs::RpoAsyncTurbo()));if(!updated)throwstd::move(updated).status();std::cout <<"RPO is set to 'ASYNC_TURBO' for " <<updated->name() <<"\n";}namespacegcs=::google::cloud::storage;using::google::cloud::StatusOr;[](gcs::Clientclient,std::stringconst&bucket_name){autoupdated=client.PatchBucket(bucket_name,gcs::BucketMetadataPatchBuilder().SetRpo(gcs::RpoDefault()));if(!updated)throwstd::move(updated).status();std::cout <<"RPO is set to 'default' for " <<updated->name() <<"\n";}C#
usingSystem;usingGoogle.Cloud.Storage.V1;publicclassSetRpoAsyncTurboSample{publicvoidSetRpoAsyncTurbo(stringbucketName="your-unique-bucket-name"){// Enabling turbo replication requires a bucket with dual-region configurationvarstorage=StorageClient.Create();varbucket=storage.GetBucket(bucketName);bucket.Rpo="ASYNC_TURBO";storage.UpdateBucket(bucket);Console.WriteLine($"Turbo replication enabled for bucket {bucketName}");}}usingSystem;usingGoogle.Cloud.Storage.V1;publicclassSetRpoDefaultSample{publicvoidSetRpoDefault(stringbucketName="your-unique-bucket-name"){varstorage=StorageClient.Create();varbucket=storage.GetBucket(bucketName);bucket.Rpo="DEFAULT";storage.UpdateBucket(bucket);Console.WriteLine($"Turbo replication disabled for bucket {bucketName}");}}Go
import("context""fmt""io""time""cloud.google.com/go/storage")// setRPOAsyncTurbo enables turbo replication for the bucket by setting RPO to// "ASYNC_TURBO". The bucket must be dual-region to use this feature.funcsetRPOAsyncTurbo(wio.Writer,bucketNamestring)error{// bucketName := "bucket-name"ctx:=context.Background()client,err:=storage.NewClient(ctx)iferr!=nil{returnfmt.Errorf("storage.NewClient: %w",err)}deferclient.Close()ctx,cancel:=context.WithTimeout(ctx,time.Second*10)defercancel()bucket:=client.Bucket(bucketName)setRPO:=storage.BucketAttrsToUpdate{RPO:storage.RPOAsyncTurbo,}if_,err:=bucket.Update(ctx,setRPO);err!=nil{returnfmt.Errorf("Bucket(%q).Update: %w",bucketName,err)}fmt.Fprintf(w,"Turbo replication enabled for %v",bucketName)returnnil}import("context""fmt""io""time""cloud.google.com/go/storage")// setRPODefault disables turbo replication for the bucket by setting RPO to// "DEFAULT".funcsetRPODefault(wio.Writer,bucketNamestring)error{// bucketName := "bucket-name"ctx:=context.Background()client,err:=storage.NewClient(ctx)iferr!=nil{returnfmt.Errorf("storage.NewClient: %w",err)}deferclient.Close()ctx,cancel:=context.WithTimeout(ctx,time.Second*10)defercancel()bucket:=client.Bucket(bucketName)setRPO:=storage.BucketAttrsToUpdate{RPO:storage.RPODefault,}if_,err:=bucket.Update(ctx,setRPO);err!=nil{returnfmt.Errorf("Bucket(%q).Update: %w",bucketName,err)}fmt.Fprintf(w,"Turbo replication disabled for %v",bucketName)returnnil}Java
importcom.google.cloud.storage.Bucket;importcom.google.cloud.storage.Rpo;importcom.google.cloud.storage.Storage;importcom.google.cloud.storage.StorageOptions;publicclassSetAsyncTurboRpo{publicstaticvoidsetAsyncTurboRpo(StringprojectId,StringbucketName){// The ID of your GCP project// String projectId = "your-project-id";// The ID of your GCS bucket// String bucketName = "your-unique-bucket-name";Storagestorage=StorageOptions.newBuilder().setProjectId(projectId).build().getService();Bucketbucket=storage.get(bucketName);bucket.toBuilder().setRpo(Rpo.ASYNC_TURBO).build().update();System.out.println("Turbo replication was enabled for "+bucketName);}}importcom.google.cloud.storage.Bucket;importcom.google.cloud.storage.Rpo;importcom.google.cloud.storage.Storage;importcom.google.cloud.storage.StorageOptions;publicclassSetDefaultRpo{publicstaticvoidsetDefaultRpo(StringprojectId,StringbucketName){// The ID of your GCP project// String projectId = "your-project-id";// The ID of your GCS bucket// String bucketName = "your-unique-bucket-name";Storagestorage=StorageOptions.newBuilder().setProjectId(projectId).build().getService();Bucketbucket=storage.get(bucketName);bucket.toBuilder().setRpo(Rpo.DEFAULT).build().update();System.out.println("Replication was set to default for "+bucketName);}}Node.js
/** * TODO(developer): Uncomment the following lines before running the sample. */// The name of your GCS bucket in a dual-region// const bucketName = 'Name of a bucket, e.g. my-bucket';// Imports the Google Cloud client libraryconst{Storage}=require('@google-cloud/storage');// Creates a clientconststorage=newStorage();// Enable turbo replication for the bucket by setting rpo to ASYNC_TURBO.// The bucket must be a dual-region bucket.asyncfunctionsetRPOAsyncTurbo(){awaitstorage.bucket(bucketName).setMetadata({rpo:'ASYNC_TURBO',});console.log(`Turbo replication enabled for${bucketName}.`);}setRPOAsyncTurbo();/** * TODO(developer): Uncomment the following lines before running the sample. */// The name of your GCS bucket in a dual-region// const bucketName = 'Name of a bucket, e.g. my-bucket';// Imports the Google Cloud client libraryconst{Storage}=require('@google-cloud/storage');// Creates a clientconststorage=newStorage();// Disable turbo replication for the bucket by setting RPO to default.// The bucket must be a dual-region bucket.asyncfunctionsetRPODefault(){awaitstorage.bucket(bucketName).setMetadata({rpo:'DEFAULT',});console.log(`Turbo replication disabled for${bucketName}.`);}setRPODefault();PHP
use Google\Cloud\Storage\StorageClient;/** * Set the bucket's Turbo Replication(rpo) setting to `ASYNC_TURBO`. * The bucket must be a dual-region bucket. * * @param string $bucketName the name of your Cloud Storage bucket. * (e.g. 'my-bucket') */function set_rpo_async_turbo(string $bucketName): void{ $storage = new StorageClient(); $bucket = $storage->bucket($bucketName); $rpo = 'ASYNC_TURBO'; $bucket->update([ 'rpo' => $rpo ]); printf( 'The replication behavior or recovery point objective (RPO) has been set to ASYNC_TURBO for %s.' . PHP_EOL, $bucketName );}use Google\Cloud\Storage\StorageClient;/** * Set the bucket's replication behavior or recovery point objective (RPO) to `DEFAULT`. * * @param string $bucketName the name of your Cloud Storage bucket. * (e.g. 'my-bucket') */function set_rpo_default(string $bucketName): void{ $storage = new StorageClient(); $bucket = $storage->bucket($bucketName); $rpo = 'DEFAULT'; // Updating the rpo value of a multi-region bucket to DEFAULT has no effect // and updating the rpo value of a regional bucket will throw an exception. $bucket->update([ 'rpo' => $rpo ]); printf( 'The replication behavior or recovery point objective (RPO) has been set to DEFAULT for %s.' . PHP_EOL, $bucketName );}Python
fromgoogle.cloudimportstoragefromgoogle.cloud.storage.constantsimportRPO_ASYNC_TURBOdefset_rpo_async_turbo(bucket_name):"""Sets the RPO to ASYNC_TURBO, enabling the turbo replication feature"""# The ID of your GCS bucket# bucket_name = "my-bucket"storage_client=storage.Client()bucket=storage_client.bucket(bucket_name)bucket.rpo=RPO_ASYNC_TURBObucket.patch()print(f"RPO is set to ASYNC_TURBO for{bucket.name}.")fromgoogle.cloudimportstoragefromgoogle.cloud.storage.constantsimportRPO_DEFAULTdefset_rpo_default(bucket_name):"""Sets the RPO to DEFAULT, disabling the turbo replication feature"""# The ID of your GCS bucket# bucket_name = "my-bucket"storage_client=storage.Client()bucket=storage_client.bucket(bucket_name)bucket.rpo=RPO_DEFAULTbucket.patch()print(f"RPO is set to DEFAULT for{bucket.name}.")Ruby
defset_rpo_async_turbobucket_name:# The ID of your GCS bucket# bucket_name = "your-unique-bucket-name"require"google/cloud/storage"storage=Google::Cloud::Storage.newbucket=storage.bucketbucket_name,location:"ASIA"bucket.rpo=:ASYNC_TURBOputs"Turbo replication is enabled for#{bucket_name}."enddefset_rpo_defaultbucket_name:# The ID of your GCS bucket# bucket_name = "your-unique-bucket-name"require"google/cloud/storage"storage=Google::Cloud::Storage.newbucket=storage.bucketbucket_namebucket.rpo=:DEFAULTputs"The replication behavior or recovery point objective (RPO) for#{bucket_name} is set to default."end
REST APIs
JSON API
Have gcloud CLIinstalled and initialized, which lets you generate an access token for the
Authorizationheader.Create a JSON file that contains the following information:
{"rpo":"STATE"}
Where
STATEisASYNC_TURBOfor enablingTurbo Replication orDEFAULTfor disabling Turbo Replication.Use
cURLto call theJSON API with aPATCHBucket 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_NAMEis the path for the JSONfile that you created in Step 2.BUCKET_NAMEis the name of the relevantbucket. 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 APIinstead.
Check a bucket's replication status
To check therecovery point objective (RPO) or replication status of abucket, complete the following instructions:
Console
- In the Google Cloud console, go to the Cloud StorageBuckets page.
In the bucket list, click the name of the bucket you want to verify.
Click theConfiguration tab.
If turbo replication is enabled on the bucket,Replication is set toTurbo.
Command line
Use thegcloud storage buckets describe command with the--format flag:
gcloud storage buckets describe gs://BUCKET_NAME --format="default(rpo)"
Where:
BUCKET_NAMEis the name of the relevantbucket. For example,my-bucket.
If successful, the response looks like the following example:
rpo: ASYNC_TURBO
Client libraries
For more information, see theCloud StorageC++ API reference documentation. To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries. For more information, see theCloud StorageC# API reference documentation. To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries. For more information, see theCloud StorageGo API reference documentation. To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries. For more information, see theCloud StorageJava API reference documentation. To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries. For more information, see theCloud StorageNode.js API reference documentation. To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries. For more information, see theCloud StoragePHP API reference documentation. To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries. For more information, see theCloud StoragePython API reference documentation. To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries. For more information, see theCloud StorageRuby API reference documentation. To authenticate to Cloud Storage, set up Application Default Credentials. For more information, seeSet up authentication for client libraries.C++
namespacegcs=::google::cloud::storage;using::google::cloud::StatusOr;[](gcs::Clientclient,std::stringconst&bucket_name){autometadata=client.GetBucketMetadata(bucket_name);if(!metadata)throwstd::move(metadata).status();std::cout <<"RPO is " <<metadata->rpo() <<" for bucket " <<metadata->name() <<"\n";}C#
usingSystem;usingGoogle.Cloud.Storage.V1;publicclassGetRpoSample{publicstringGetRpo(stringbucketName="your-unique-bucket-name"){varstorage=StorageClient.Create();varrpo=storage.GetBucket(bucketName).Rpo;Console.WriteLine($"The RPO Setting of bucket {bucketName} is {rpo}.");returnrpo;}}Go
import("context""fmt""io""time""cloud.google.com/go/storage")// getRPO gets the current RPO (Recovery Point Objective) setting// for the bucket, either "DEFAULT" or "ASYNC_TURBO".funcgetRPO(wio.Writer,bucketNamestring)error{// bucketName := "bucket-name"ctx:=context.Background()client,err:=storage.NewClient(ctx)iferr!=nil{returnfmt.Errorf("storage.NewClient: %w",err)}deferclient.Close()ctx,cancel:=context.WithTimeout(ctx,time.Second*10)defercancel()attrs,err:=client.Bucket(bucketName).Attrs(ctx)iferr!=nil{returnfmt.Errorf("Bucket(%q).Attrs: %w",bucketName,err)}fmt.Fprintf(w,"RPO is %s for %v",attrs.RPO,bucketName)returnnil}Java
importcom.google.cloud.storage.Bucket;importcom.google.cloud.storage.Storage;importcom.google.cloud.storage.StorageOptions;publicclassGetBucketRpo{publicstaticvoidgetBucketRpo(StringprojectId,StringbucketName){// The ID of your GCP project// String projectId = "your-project-id";// The ID of your GCS bucket// String bucketName = "your-unique-bucket-name";Storagestorage=StorageOptions.newBuilder().setProjectId(projectId).build().getService();Bucketbucket=storage.get(bucketName);Stringrpo=bucket.getRpo().toString();System.out.println("The RPO setting of bucket "+bucketName+" is "+rpo);}}Node.js
/** * TODO(developer): Uncomment the following lines before running the sample. */// The name of your GCS bucket in a dual-region// const bucketName = 'Name of a bucket, e.g. my-bucket';// Imports the Google Cloud client libraryconst{Storage}=require('@google-cloud/storage');// Creates a clientconststorage=newStorage();asyncfunctiongetRPO(){// Gets Bucket Metadata and prints RPO value (either 'default' or 'async_turbo').// If RPO is undefined, the bucket is a single region bucketconst[metadata]=awaitstorage.bucket(bucketName).getMetadata();console.log(`RPO is${metadata.rpo} for${bucketName}.`);}getRPO();PHP
use Google\Cloud\Storage\StorageClient;/** * Get the bucket's recovery point objective (RPO) setting. * * @param string $bucketName the name of your Cloud Storage bucket. * (e.g. 'my-bucket') */function get_rpo(string $bucketName): void{ $storage = new StorageClient(); $bucket = $storage->bucket($bucketName); printf( 'The bucket\'s RPO value is: %s.' . PHP_EOL, $bucket->info()['rpo'] );}Python
Ruby
REST APIs
JSON API
Have gcloud CLIinstalled and initialized, which lets you generate an access token for the
Authorizationheader.Use
cURLto call theJSON APIwith aGETBucket 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_NAMEis the name of therelevant bucket. For example,my-bucket.The response looks like the following example:
{"name":"my-bucket","projectNumber":"234...",..."rpo":"ASYNC_TURBO"}
Notice the
rpokey. The valueASYNC_TURBOindicates thatturbo replication is enabled.DEFAULTindicates that defaultreplication is applied. Therpofield 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 APIinstead.
What's next
- Learn more aboutturbo replication.
- Learn more aboutturbo replication pricing.
- Learn aboutmetrics that monitor your bucket's performance,including replication performance.
- Learn howCloud Monitoring alerting can be used to create alteringpolicies based on specified metrics and manage notifications associated withthem.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-19 UTC.