This predefined role contains
the permissions required to relocate buckets. To see the exact permissions that are
required, expand the Required permissions section:
Required permissions
The following permissions are required to relocate buckets:
To relocate a bucket:
storage.buckets.relocate
To view the status of a bucket relocation operation:
storage.bucketOperations.get
To view the list of bucket relocation operations for a project:
storage.bucketOperations.list
To cancel a bucket relocation operation:
storage.bucketOperations.cancel
To view the metadata of a bucket during the dry run and bucket relocation phases:
storage.buckets.get
To get an object in a bucket you want to relocate:
storage.objects.get
To list the objects in a bucket you want to relocate:
storage.objects.list
Test the bucket relocation with a dry run (Optional)
To minimize potential issues during the bucket relocation process, we
recommend you perform a dry run to test the end-to-end process. A dry run simulates the
bucket relocation process without moving data, helping you
to catch and resolve issues early on. The dry run checks for the following incompatibilities:
While a dry run can't identify every
possible issue as some issues might only surface during the live migration
due to factors such as real-time resource availability, it reduces
the risk of facing time-consuming issues during the actual relocation.
Console
In the Google Cloud console, go to the Cloud Storage Buckets page.
In the list of buckets, click the name of the bucket you want to relocate.
On the Bucket details page, click the Configuration tab.
In the Overview section, click editEdit next to the Location field.
On the Relocate bucket page, enter your bucket's new location. After each of the following steps, click Continue to proceed to the next step:
In the Confirm the bucket you plan to relocate section, review the bucket and its location.
In the Before you continue section, review configurations that block the relocation. If a restriction applies to your bucket, consider Storage Transfer Service as an alternative workaround.
In the Choose where to relocate your bucket section, do the
following:
Select a
location where object data
within your bucket will be stored.
Based on the source and destination location, you'll be informed if a
write downtime is required. For information about the types of relocation
and downtime, see Relocation types.
In the Choose how you'd like to proceed section, click Start with a dry run (recommended). A dry run simulates the relocation to identify potential issues without moving data.
Click Continue.
Click Start.
On the Start with a dry run confirmation dialog, review the message that appears and click Start dry run.
In the list of buckets, click the name of the bucket you want to relocate.
On the Bucket details page, click the Configuration tab.
In the Overview section, click editEdit next to the Location field.
On the Relocate bucket page, enter your bucket's new location. After each of the following steps, click Continue to proceed to the next step:
In the Confirm the bucket you plan to relocate section, review the bucket and its location.
In the Before you continue section, review configurations that block the relocation. If a restriction applies to your bucket, consider Storage Transfer Service as an alternative workaround.
In the Choose where to relocate your bucket section, do the
following:
Select a
location where object data
within your bucket will be stored.
Based on the source and destination location, you'll be informed if a
write downtime is required. For information about the types of relocation
and downtime, see Relocation types.
In the Choose how you'd like to proceed section, click Relocate now.
Click Continue.
To start the relocation process, click Start.
On the Relocate now confirmation dialog, review the message that appears and click Start relocate.
For relocations that require a write downtime, you'll need to initiate the final
synchronization. The final synchronization step involves a period where you
cannot perform write operations on the bucket. We recommend that you schedule
the final synchronization step at a time that minimizes disruption to your
applications.
Console
To initiate the final synchronization step, complete the following steps:
In the Google Cloud console, go to the Cloud Storage Buckets page.
In the list of buckets, click the name of the bucket that you are
relocating.
On the Bucket details page, click the Operations tab.
In the list of bucket operations, click the relocation operation to view
the operation details page. On the operation details page, when the data
copy is at least 99% complete, a message bar appears indicating it's the
optimal time to start the final synchronization.
Optional: To set the maximum allowed write downtime, click Set maximum
allowed downtime (TTL) and specify the maximum downtime duration.
Click Start final synchronization.
On the confirmation dialog that appears, click Start to begin the final
synchronization.
The operation details page shows the relocation summary, key metrics,
and an error summary.
BUCKET_NAME is the name of the bucket that you want to relocate.
OPERATION_ID is the ID of the bucket relocation long-running operation, which is returned in the response of methods you call. For example, the following response is returned from calling gcloud storage operations list and the long-running operation ID is AbCJYd8jKT1n-Ciw1LCNXIcubwvij_TdqO-ZFjuF2YntK0r74.
TTL_DURATION is the Time to live (TTL) for the write
downtime phase during a relocation process. It is expressed as a string,
such as 12h for 12 hours. The TTL_DURATION determines the maximum allowed
duration for the write downtime phase. If the write downtime exceeds this limit,
the relocation process automatically reverts to the bucket relocation step,
and write operations to the bucket are re-enabled. The value must be within the
range of 6h (6 hours) to 48h (48 hours). If not specified, the default
value is 12h (12 hours).
JSON API
Before you proceed, confirm that the bucket is fully prepared by checking the
finalizationState value in the output of the bucket relocation step. The finalizationState value must be READY to proceed.
If you initiate the final synchronization step prematurely, the command returns
an error message The relocate bucket operation isn't ready to advance to finalization running state but the relocation process continues.
We recommend that you wait until the progressPercent value is 99 before initiating the final synchronization step.
EXPIRE_TIME is the time the write downtime expires.
TTL_DURATION is the Time to live (TTL) for the write
downtime phase during a relocation process. It is expressed as a string,
such as 12h for 12 hours. The TTL_DURATION determines the maximum allowed
duration for the write downtime phase. If the write downtime exceeds this limit,
the relocation process automatically reverts to the bucket relocation step,
and write operations to the bucket are re-enabled. The value must be within the
range of 6h (6 hours) to 48h (48 hours). If not specified, the default
value is 12h (12 hours).
JSON_FILE_NAME is the name of the JSON file you created.
BUCKET_NAME is the name of the bucket you want to relocate.
OPERATION_ID is the ID of the long-running operation that initiated the bucket relocation. To get the list of long-running operation IDs for a bucket, see Operations: list.
Validate the bucket relocation process
After initiating a relocation, verify its successful completion. This section
provides guidance on confirming the successful transfer of data.
Validate the success of the relocation process using the following methods:
Poll long-running operations: Bucket relocation is a
long-running operation. You can poll the long-running operation using the
operation id to monitor the operation's progress and confirm its
successful completion by verifying the success state. This involves
periodically querying the operation's status until it reaches a terminal
state. For information about monitoring long-running operations, see Use
long-running operations in Cloud Storage.
Analyze Cloud Audit Logs entries: Cloud Audit Logs provides a detailed
record of events and operations in your Google Cloud environment. You can
analyze the Cloud Audit Logs entries associated with the relocation to
validate its success. Analyze the logs for any errors, warnings, or
unexpected behavior that might indicate issues during the transfer. For
information about viewing Cloud Audit Logs logs, see Viewing audit
logs.
The following log entries help you to determine if your move is a success or a failure:
Successful relocation: Relocate bucket succeeded. All existing objects
are now in the new placement configuration.
Failed relocation: Relocate bucket has failed. Bucket location remains
unchanged.
Using Pub/Sub notifications, you can also set up alerts that notify
when the specific success or failure event appears in the logs. For information
about setting up Pub/Sub notifications, see Configure
Pub/Sub notifications for Cloud Storage.
Complete the post bucket relocation tasks
After you have successfully relocated your bucket, complete the following steps:
Optional: Restore any tag-based access controls on your bucket.
Existing inventory report configurations are not preserved during the relocation process and you'll need to manually recreate them. For information about creating an inventory report configuration, see Create an inventory report configuration.
Update your infrastructure as code configurations such as Terraform and
Google Kubernetes Engine configuration connector to specify the bucket's new location.
Regional endpoints are tied to specific locations, and you'll need to modify your application code to reflect the new endpoint.
How to handle failed bucket relocation operations
Consider the following factors before handling failed
bucket relocation operations:
A failed bucket relocation might leave obsolete
resources, such as temporary files or incomplete data copies, at the
destination. You must wait 7 to 14 days before initiating another
bucket relocation to the same destination. You can
initiate a bucket relocation to a different destination
immediately.
If the destination location isn't the optimal location for your data, you
might want to roll back the relocation. However, you cannot initiate a
relocation immediately. A waiting period of 7 to 14 days is required before
you can initiate a relocation back to the original source location
in order to maintain stability and avoid data conflicts.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-06-09 UTC."],[],[]]