Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
En esta página, se describe cómo usar la replicación entre buckets, que usa el Servicio de transferencia de almacenamiento para copiar objetos nuevos y actualizados de forma asíncrona de un bucket de origen a uno de destino. Cuando usas la replicación entre buckets, creas y administras trabajos de replicación, que son un tipo de trabajo en Storage Transfer Service.
Antes de comenzar
Para usar la replicación entre bucket, debes completar los pasos previos necesarios. Para obtener instrucciones, consulta Antes de comenzar en la documentación del Servicio de transferencia de almacenamiento.
Crea un trabajo de replicación
Console
Cuando creas un trabajo de replicación entre buckets con la consola deGoogle Cloud , el agente de servicio de Servicio de transferencia de almacenamiento recibe automáticamente el rol de storage.legacyBucketOwner en el bucket de origen y el rol de storage.legacyBucketWriter en el bucket de destino.
Cuando usas la consola de Google Cloud , puedes crear un trabajo de replicación para buckets existentes o para buckets nuevos durante el proceso de creación de bucket.
Para crear un trabajo de replicación para un bucket nuevo, sigue las instrucciones para crear un bucket nuevo.
Para crear un trabajo de replicación para un bucket existente, completa los siguientes pasos:
En la consola de Google Cloud , ve a la página Buckets de Cloud Storage.
En la lista de buckets, haz clic en el nombre del bucket de origen cuyos objetos deseas replicar.
En la página de detalles del bucket haz clic en la pestaña Configuración.
Busca la opción Replicación entre buckets y haz clic en editEditar.
En el panel Editar replicación entre buckets que se abre, haz clic en Agregar un destino.
En la sección Elige un destino, selecciona un bucket de destino y, luego, haz clic en Siguiente.
En la sección Elige la configuración de replicación, haz lo siguiente:
Opcional: Para filtrar los objetos que se replicarán por prefijo de nombre de objeto, selecciona la casilla de verificación Replicar objetos en función del prefijo en la sección Elegir qué objetos replicar.
Para incluir objetos por prefijo, ingresa un prefijo en la sección Incluir objetos con prefijo y, luego, haz clic en addAgregar un prefijo.
Para excluir objetos por prefijo, ingresa un prefijo en la sección Excluir los objetos con prefijo y, luego, haz clic en addAgregar un prefijo.
Opcional: Para establecer una clase de almacenamiento para los objetos replicados, selecciona una clase de almacenamiento del menú en la sección Establecer la clase de almacenamiento para los objetos replicados.
Si omites este paso, los objetos replicados usarán la clase de almacenamiento del bucket de destino de forma predeterminada.
No puedes enumerar trabajos de replicación con la consola de Google Cloud . Consulta Cómo ver un trabajo de replicación para obtener instrucciones sobre cómo ver un solo trabajo de replicación a la vez.
En la lista de buckets, haz clic en el nombre del bucket de origen cuyo trabajo de replicación entre buckets deseas ver.
En la página de detalles del bucket haz clic en la pestaña Configuración.
Busca la opción Replicación entre buckets y haz clic en editEditar.
Aparecerá el panel Editar replicación entre buckets, que muestra la tarea de replicación de cada bucket de destino.
En la página Buckets, puedes ver la columna Replication, que muestra si un bucket tiene un trabajo de replicación turbo o un trabajo de replicación entre buckets en ejecución. Para obtener instrucciones sobre cómo mostrar la columna Replicación, consulta Cómo mostrar columnas.
En la lista de buckets, haz clic en el nombre del bucket de origen cuya replicación deseas pausar o reanudar.
En la página de detalles del bucket haz clic en la pestaña Configuración.
Busca la opción Replicación entre buckets y haz clic en editEditar.
En el panel Editar replicación entre buckets que aparece, haz clic en pausePausar o play_arrowDespausar junto al trabajo de replicación que deseas actualizar.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-05 (UTC)"],[],[],null,["# Use cross-bucket replication\n\nThis page describes how to use [cross-bucket replication](/storage/docs/availability-durability#cross-bucket-replication), which uses\n[Storage Transfer Service](/storage-transfer/docs/overview) to copy new and updated objects asynchronously from a\nsource bucket to a destination bucket. When you use cross-bucket replication,\nyou create and manage replication jobs, which are a type of job in\nStorage Transfer Service.\n\nBefore you begin\n----------------\n\nTo use cross-bucket replication, you must complete prerequisite steps. For\ninstructions, refer to [Before you begin](/storage-transfer/docs/cross-bucket-replication#before-you-begin) in the Storage Transfer Service\ndocumentation.\n\nCreate a replication job\n------------------------\n\n### Console\n\nWhen you create a cross-bucket replication job using the\nGoogle Cloud console, the Storage Transfer Service service agent is\nautomatically granted the `storage.legacyBucketOwner` role on the source\nbucket and the `storage.legacyBucketWriter` role on the destination\nbucket.\n\nWhen using the Google Cloud console, you can create a replication job for\nexisting buckets or for new buckets during the bucket creation process.\n\nTo create a replication job for a new bucket, follow the instructions for\n[creating a new bucket](/storage/docs/creating-buckets#create-bucket).\n\nTo create a replication job for an existing bucket, complete the following\nsteps:\n\n1. In the Google Cloud console, go to the Cloud Storage **Buckets** page. \n\n [Go to Buckets](https://console.cloud.google.com/storage/browser)\n2. In the list of buckets, click the name of the source bucket whose objects\n you want to replicate.\n\n3. On the **Bucket details** page, click the **Configuration** tab.\n\n4. Locate the **Cross-bucket replication** option and click\n edit **Edit**.\n\n5. In the **Edit cross-bucket replication** pane that opens, click\n **Add a destination**.\n\n6. In the **Choose a destination** section, select a destination bucket,\n then click **Next**.\n\n7. In the **Choose replication settings** section, do the following:\n\n - Optional: To filter objects to replicate by object name prefix,\n select the **Replicate objects based on prefix** checkbox in the\n **Choose which objects to replicate** section.\n\n - To include objects by prefix, enter a prefix in the\n **Include objects with prefix** section, then\n click add **Add a prefix**.\n\n - To exclude objects by prefix, enter a prefix in the\n **Exclude objects with prefix** section, then click\n add **Add a prefix**.\n\n - Optional: To set a storage class for replicated objects, select a\n storage class from the menu in the\n **Set storage class for replicated objects** section.\n\n If you skip this step, replicated objects use the destination bucket's\n storage class by default.\n\n 1. Click **Save**.\n\n### Command line\n\nFor Google Cloud CLI instructions on how to create a replication job,\nrefer to [Create a replication job using the Google Cloud CLI](/storage-transfer/docs/cross-bucket-replication#create-replication-job).\n\n### REST APIs\n\n### JSON API\n\nFor JSON API instructions on how to create a replication job,\nrefer to [Create a replication job using the JSON API](/storage-transfer/docs/cross-bucket-replication#create-replication-job).\n\nTo check the status of the replication job,\n[view Cloud Logging for Storage Transfer Service logs](/storage-transfer/docs/transfer-logs#view-logs).\n\nList replication jobs\n---------------------\n\n### Console\n\nYou cannot list replication jobs using the Google Cloud console. See\n[View replication job](#view-replication-job) for instructions on how to view a single\nreplication job at a time.\n\n### Command line\n\nFor Google Cloud CLI instructions on how to list replication jobs,\nrefer to [List replication jobs using the Google Cloud CLI](/storage-transfer/docs/cross-bucket-replication#list-replication-jobs).\n\n### REST APIs\n\n### JSON API\n\nFor JSON API instructions on how to list replication jobs,\nrefer to [List replication jobs using the JSON API](/storage-transfer/docs/cross-bucket-replication#list-replication-jobs).\n\nView a replication job\n----------------------\n\n### Console\n\n1. In the Google Cloud console, go to the Cloud Storage **Buckets** page. \n\n [Go to Buckets](https://console.cloud.google.com/storage/browser)\n2. In the list of buckets, click the name of the source bucket whose\n cross-bucket replication job you want to view.\n\n3. On the **Bucket details** page, click the **Configuration** tab.\n\n4. Locate the **Cross-bucket replication** option and click\n edit **Edit**.\n\n The **Edit cross-bucket replication** pane appears, which displays\n the replication job for each destination bucket.\n\nOn the **Buckets** page, you can view the **Replication** column, which\ndisplays whether a bucket has a Turbo replication job or a cross-bucket\nreplication job running. For instructions on displaying the **Replication**\ncolumn, see [Show columns](/storage/docs/cloud-console#show-columns).\n\n### Command line\n\nFor Google Cloud CLI instructions on how to view a replication job,\nrefer to [View a replication job using the Google Cloud CLI](/storage-transfer/docs/cross-bucket-replication#view-replication-job).\n\n### REST APIs\n\n### JSON API\n\nFor JSON API instructions on how to view a replication job,\nrefer to [View a replication job using the JSON API](/storage-transfer/docs/cross-bucket-replication#view-replication-job).\n\nUpdate a replication job\n------------------------\n\nYou can update the following fields of a replication job:\n\n- The description of the replication job\n\n- The configuration for running a replication job\n\n- The configuration of notifications published to Pub/Sub\n\n- The logging behavior for replication job operations\n\n- The status of the replication job (whether it's enabled, disabled, or deleted)\n\n### Console\n\nWhen using the Google Cloud console, you can only update a replication\njob by pausing or unpausing the job.\n\n1. In the Google Cloud console, go to the Cloud Storage **Buckets** page. \n\n [Go to Buckets](https://console.cloud.google.com/storage/browser)\n2. In the list of buckets, click the name of the source bucket that\n you want to pause or unpause replicating.\n\n3. On the **Bucket details** page, click the **Configuration** tab.\n\n4. Locate the **Cross-bucket replication** option and click\n edit **Edit**.\n\n5. In the **Edit cross-bucket replication** pane that appears, click\n pause **Pause** or\n play_arrow **Unpause** next to the\n replication job you want to update.\n\n### Command line\n\nFor Google Cloud CLI instructions on how to update a replication job,\nrefer to [Update a replication job using the Google Cloud CLI](/storage-transfer/docs/cross-bucket-replication#update-replication-job).\n\n### REST APIs\n\n### JSON API\n\nFor JSON API instructions on how to update a replication job,\nrefer to [Update a replication job using the JSON API](/storage-transfer/docs/cross-bucket-replication#update-replication-job).\n\nDelete a replication job\n------------------------\n\n### Console\n\n1. In the Google Cloud console, go to the Cloud Storage **Buckets** page. \n\n [Go to Buckets](https://console.cloud.google.com/storage/browser)\n2. In the list of buckets, click the name of the source bucket you\n want to stop replicating.\n\n3. On the **Bucket details** page, click the **Configuration** tab.\n\n4. Locate the **Cross-bucket replication** option and click\n edit **Edit**.\n\n5. In the **Edit cross-bucket replication** pane that appears, click\n delete **Delete** next to the\n replication job you want to delete.\n\n6. In the dialogue that appears, click **Confirm**.\n\n### Command line\n\nFor Google Cloud CLI instructions on how to delete a replication job,\nrefer to [Delete a replication job using the Google Cloud CLI](/storage-transfer/docs/cross-bucket-replication#delete-replication-job).\n\n### REST APIs\n\n### JSON API\n\nFor JSON API instructions on how to delete a replication job,\nrefer to [Delete a replication job using the JSON API](/storage-transfer/docs/cross-bucket-replication#delete-replication-job).\n\nWhat's next\n-----------\n\n[Monitor your replicated objects](/storage/docs/monitoring#cross-bucket_replication_graphs)."]]