Gestire gli upgrade delle versioni per istanze e pipeline
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Questa pagina descrive l'upgrade della versione delle istanze o delle pipeline batch.
Esegui l'upgrade delle istanze e delle pipeline batch di Cloud Data Fusion alle versioni più recenti della piattaforma e dei plug-in per usufruire delle funzionalità, delle correzioni di bug e dei miglioramenti delle prestazioni più recenti.
Prima di iniziare
Pianifica un tempo di inattività programmato per l'upgrade.
La procedura richiede fino a un'ora.
In the Google Cloud console, activate Cloud Shell.
Dopo aver creato un'istanza Cloud Data Fusion, non puoi modificarne
l'edizione, nemmeno tramite un'operazione di upgrade.
Non attivare un upgrade con Terraform, in quanto elimina e ricrea l'istanza anziché eseguire un upgrade in loco. Questo problema comporta
la perdita di tutti i dati esistenti all'interno dell'istanza.
Cloud Data Fusion non riavvia le pipeline che si arrestano a seguito dell'operazione di upgrade.
Quando esegui l'upgrade di un'istanza da versioni precedenti alla 6.11.0, prevedi un tempo di inattività maggiore per l'upgrade, soprattutto se l'istanza gestisce molti dati.
L'upgrade delle pipeline in tempo reale non è supportato, tranne che nelle pipeline create
nella versione 6.8.0 con un'origine in tempo reale Kafka. Per una soluzione alternativa, vedi
Eseguire l'upgrade delle pipeline in tempo reale.
Esegui l'upgrade delle istanze Cloud Data Fusion
Per eseguire l'upgrade di un'istanza Cloud Data Fusion a una nuova versione di Cloud Data Fusion, vai alla pagina Dettagli istanza:
Nella Google Cloud console, vai alla pagina Cloud Data Fusion.
Fai clic su Istanze, quindi sul nome dell'istanza per andare alla pagina Dettagli istanza.
Azione consigliata: esegui il backup di tutte le pipeline. Puoi eseguire il backup delle pipeline in uno dei
due modi seguenti:
Scarica il file zip seguendo questi passaggi:
Per attivare il download di un file zip, esegui il backup di tutte le pipeline con il
seguente comando:
echo$CDAP_ENDPOINT/v3/export/apps
Copia l'output dell'URL nel browser.
Estrai il file scaricato, quindi verifica che tutte le pipeline siano state esportate. Le pipeline sono organizzate per spazio dei nomi.
Esegui il backup delle pipeline utilizzando Source Control Management (SCM), disponibile nella versione 6.9 e successive. SCM fornisce l'integrazione
di GitHub, che puoi utilizzare per eseguire il backup delle pipeline.
Esegui l'upgrade delle pipeline seguendo questi passaggi:
Crea una variabile che indirizzi al file pipeline_upgrade.json che
creerai nel passaggio successivo per salvare un elenco di pipeline.
export PIPELINE_LIST=PATH/pipeline_upgrade.json
Sostituisci PATH con il percorso del file.
Crea un elenco di tutte le pipeline per un'istanza e uno spazio dei nomi utilizzando
il seguente comando. Il risultato viene archiviato nel file $PIPELINE_LIST
in formato JSON. Puoi modificare l'elenco per rimuovere le pipeline che non
necessitano di upgrade.
Sostituisci NAMESPACE_ID con lo spazio dei nomi in cui vuoi che
avvenga l'upgrade.
Esegui l'upgrade delle pipeline elencate in pipeline_upgrade.json.
Inserisci il NAMESPACE_ID delle pipeline di cui eseguire l'upgrade.
Il comando mostra un elenco delle pipeline di cui è stato eseguito l'upgrade con il relativo stato.
Sostituisci NAMESPACE_ID con l'ID spazio dei nomi delle pipeline
che vengono aggiornate.
Per evitare che le pipeline si blocchino quando le esegui nella nuova versione, concedi i ruoli richiesti nell'istanza di cui è stato eseguito l'upgrade.
Eseguire l'upgrade delle pipeline in tempo reale
L'upgrade delle pipeline in tempo reale non è supportato, tranne che nelle pipeline create nella versione 6.8.0 con un'origine in tempo reale Kafka.
Per tutto il resto, invece, procedi nel seguente modo:
Interrompi ed esporta le pipeline.
Esegui l'upgrade dell'istanza.
Importa le pipeline in tempo reale nell'istanza di cui è stato eseguito l'upgrade.
Esegui l'upgrade per abilitare la replica
La replica può essere abilitata negli ambienti Cloud Data Fusion
nella versione 6.3.0 o successive. Se hai la versione 6.2.3, esegui l'upgrade alla versione 6.3.0, quindi esegui l'upgrade all'ultima versione. A questo punto, puoi abilitare la replica.
Concedi ruoli per le istanze di cui è stato eseguito l'upgrade
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[[["\u003cp\u003eThis guide explains how to upgrade Cloud Data Fusion instances and batch pipelines to the latest versions for improved features, bug fixes, and performance.\u003c/p\u003e\n"],["\u003cp\u003eBefore initiating an upgrade, it is mandatory to stop all running pipelines, suspend scheduled pipelines, and disable upstream triggers to avoid unpredictable issues and ensure instance availability.\u003c/p\u003e\n"],["\u003cp\u003eUpgrading a Cloud Data Fusion instance involves selecting a new version through the Google Cloud console or gcloud CLI, followed by verification of the successful upgrade within the instance's web interface.\u003c/p\u003e\n"],["\u003cp\u003eBatch pipeline upgrades require backing up pipelines, either by downloading a zip file or using Source Control Management, followed by using a specific command-line process to upgrade the pipelines listed in a JSON file.\u003c/p\u003e\n"],["\u003cp\u003eUpgrading real-time pipelines is generally not supported, but for real-time pipelines that were created with Kafka in version 6.8.0 it is, and a workaround for other real-time pipelines is to export the pipeline, upgrade the instance, then import the real-time pipeline into the new instance.\u003c/p\u003e\n"]]],[],null,["# Manage version upgrades for instances and pipelines\n\nThis page describes upgrading the version of your instances or batch\npipelines.\n\nUpgrade your Cloud Data Fusion instances and batch pipelines to the latest\nplatform and plugin versions for the latest features, bug fixes, and performance\nimprovements.\n\nBefore you begin\n----------------\n\n| **Caution:** Before you upgrade, stop all running pipelines, suspend all pipeline schedules and disable all upstream triggers, such as Cloud Composer triggers. Upgrading an instance that has running pipelines can have unpredictable results and affect instance availability.\n\n- **Plan a scheduled downtime for the upgrade.** The process takes up to an hour.\n- In the Google Cloud console, activate Cloud Shell.\n\n [Activate Cloud Shell](https://console.cloud.google.com/?cloudshell=true)\n\n\u003cbr /\u003e\n\nLimitations\n-----------\n\n- After you create a Cloud Data Fusion instance, you cannot change its\n edition, even through an upgrade operation.\n\n- Don't trigger an upgrade with Terraform, as it deletes and recreates the\n instance, instead of performing an in-place upgrade. This issue results\n in the loss of any existing data within the instance.\n\n- Cloud Data Fusion doesn't restart pipelines that stop as a result of\n the upgrade operation.\n\n- When you upgrade an instance from versions prior to 6.11.0, expect greater\n downtime for the upgrade, especially if the instance handles a lot of data.\n\n- Upgrading real-time pipelines isn't supported, except in pipelines created\n in version 6.8.0 with a Kafka real-time source. For a workaround, see\n [Upgrade real-time pipelines](#upgrade-real-time-pipelines).\n\nUpgrade Cloud Data Fusion instances\n-----------------------------------\n\nTo upgrade a Cloud Data Fusion instance to a new Cloud Data Fusion\nversion, go to the **Instance details** page:\n\n1. In the Google Cloud console, go to the Cloud Data Fusion page.\n\n2. Click **Instances** , and then click the instance's name to go to the\n **Instance details** page.\n\n [Go to Instances](https://console.cloud.google.com/data-fusion/locations/-/instances)\n\nThen perform the upgrade using either the Google Cloud console or\ngcloud CLI: \n\n### Console\n\n1. Click **Upgrade** for a list of available versions.\n\n2. Select a version.\n\n3. Click **Upgrade**.\n\n4. Verify that the upgrade was successful:\n\n 1. Refresh the **Instance details** page.\n\n 2. Click **View instance** to access the upgraded instance in the\n Cloud Data Fusion web interface.\n\n 3. Click **System admin** in the menu bar.\n\n The new version number appears at the top of the page.\n5. To prevent your pipelines from getting stuck when you run them in the\n new version, [grant the required roles](#grant-roles) in your upgraded\n instance.\n\n### gcloud\n\n1. To upgrade to a new Cloud Data Fusion version, run the following\n gcloud CLI command from a local terminal\n [Cloud Shell](https://console.cloud.google.com/?cloudshell=true) session:\n\n gcloud beta data-fusion instances update \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e \\\n --project=\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e \\\n --location=\u003cvar translate=\"no\"\u003eLOCATION_NAME\u003c/var\u003e \\\n --version=\u003cvar translate=\"no\"\u003eAVAILABLE_INSTANCE_VERSION\u003c/var\u003e\n\n - Optional: If applicable for your instance, add the\n [`--enable_stackdriver_logging`](/sdk/gcloud/reference/beta/data-fusion/instances/update#--enable_stackdriver_logging),\n [`--enable_stackdriver_monitoring`](/sdk/gcloud/reference/beta/data-fusion/instances/update#--enable_stackdriver_monitoring), and\n [`--labels`](/sdk/gcloud/reference/beta/data-fusion/instances/update#--labels) flags.\n\n - Optional: You can pass the CDAP properties, such as\n `enable.unrecoverable.reset`, as\n [`--options`](/sdk/gcloud/reference/beta/data-fusion/instances/update#--options).\n\n2. Verify that the upgrade was successful by following these steps:\n\n 1. In the Google Cloud console, go to the Cloud Data Fusion\n **Instances** page.\n\n 2. Click **View instance** to access the upgraded instance in the\n Cloud Data Fusion web interface.\n\n 3. Click **System Admin** in the menu bar.\n\n The new version number appears at the top of the page.\n3. To prevent your pipelines from getting stuck when you run them in the\n new version, [grant the required roles](#grant-roles) in your upgraded\n instance.\n\nUpgrade batch pipelines\n-----------------------\n\nTo upgrade your Cloud Data Fusion batch pipelines to use the latest\nplugin versions:\n\n1. [Set environment variables](/data-fusion/docs/reference/cdap-reference#set-up).\n\n2. **Recommended:** Back up all pipelines. You can back up pipelines in one of\n two ways:\n\n - Download the zip file by following these steps:\n\n 1. To trigger a zip file download, back up all pipelines with the following command:\n\n echo $CDAP_ENDPOINT/v3/export/apps\n\n 1. Copy the URL output to your browser.\n 2. Extract the downloaded file, then confirm that all pipelines were exported. The pipelines are organized by namespace.\n - Back up pipelines using [Source Control Management](/data-fusion/docs/how-to/source-control-management)\n (SCM), available in version 6.9 and later. SCM provides GitHub\n integration, which you can use to back up pipelines.\n\n3. Upgrade pipelines by following these steps:\n\n 1. Create a variable that points to the `pipeline_upgrade.json` file that\n you will create in the next step to save a list of pipelines.\n\n export PIPELINE_LIST=\u003cvar translate=\"no\"\u003ePATH\u003c/var\u003e/pipeline_upgrade.json\n\n Replace \u003cvar translate=\"no\"\u003ePATH\u003c/var\u003e with the path to the file.\n 2. Create a list of all pipelines for an instance and namespace using\n the following command. The result is stored in the `$PIPELINE_LIST` file\n in `JSON` format. You can edit the list to remove pipelines that don't\n need upgrades.\n\n curl -H \"Authorization: Bearer $(gcloud auth print-access-token)\" -H \"Content-Type: application/json\" ${CDAP_ENDPOINT}/v3/namespaces/\u003cvar translate=\"no\"\u003eNAMESPACE_ID\u003c/var\u003e/apps -o $PIPELINE_LIST\n\n Replace \u003cvar translate=\"no\"\u003eNAMESPACE_ID\u003c/var\u003e with the namespace where you want the\n upgrade to happen.\n 3. Upgrade the pipelines listed in `pipeline_upgrade.json`.\n Insert the \u003cvar translate=\"no\"\u003eNAMESPACE_ID\u003c/var\u003e of pipelines to be upgraded.\n The command displays a list of upgraded pipelines with their upgrade\n status.\n\n curl -N -H \"Authorization: Bearer $(gcloud auth print-access-token)\" -H \"Content-Type: application/json\" ${CDAP_ENDPOINT}/v3/namespaces/\u003cvar translate=\"no\"\u003eNAMESPACE_ID\u003c/var\u003e/upgrade --data @$PIPELINE_LIST\n\n Replace \u003cvar translate=\"no\"\u003eNAMESPACE_ID\u003c/var\u003e with the namespace ID of the pipelines\n that are getting upgraded.\n4. To prevent your pipelines from getting stuck when you run them in the new\n version, [grant the required roles](#grant-roles) in your upgraded instance.\n\nUpgrade real-time pipelines\n---------------------------\n\nUpgrading real-time pipelines is not supported, except in pipelines created in\nversion 6.8.0 with a Kafka real-time source.\n\nFor everything else, you instead do the following:\n\n1. Stop and export the pipelines.\n2. Upgrade the instance.\n3. Import the real-time pipelines into your upgraded instance.\n\nUpgrade to enable Replication\n-----------------------------\n\nReplication can be enabled in Cloud Data Fusion\nenvironments in version 6.3.0 or later. If you have version 6.2.3, upgrade to\n6.3.0, then upgrade to the latest version. You can then [enable Replication](/data-fusion/docs/how-to/enable-replication).\n\nGrant roles for upgraded instances\n----------------------------------\n\nAfter the upgrade completes, grant the\n[Cloud Data Fusion Runner role](/data-fusion/docs/how-to/granting-service-account-permission#runtime-permission)\n(`roles/datafusion.runner`) and\n[Cloud Storage Admin role](/data-fusion/docs/how-to/granting-service-account-permission#admin-permission)\n(`roles/storage.admin`) to the Dataproc service account in your\n[project](/data-fusion/docs/concepts/security#projects).\n\nWhat's next\n-----------\n\n- [Manage patch revisions](/data-fusion/docs/how-to/upgrade-to-patch-revision) for Cloud Data Fusion instances.\n- Learn about [versioning in Cloud Data Fusion](/data-fusion/docs/concepts/versioning).\n- Refer to the [available version and patch revision upgrades](/data-fusion/docs/concepts/available-upgrades).\n- [Troubleshoot upgrades](/data-fusion/docs/support/troubleshoot-upgrades)."]]