Stay organized with collections
Save and categorize content based on your preferences.
For continuous migrations, you can initiate the promotion process
after it's time to move reads and writes to the destination databases.
Promotion means that Database Migration Service disconnects from your source database,
stops replicating change data events to the destination database,
and cleans up all the temporary migration data.
The destination instance is promoted, and your migrated databases
are now accessible for all read and write operations.
The migration job status changes to Completed.
The application can now be connected to the AlloyDB for PostgreSQL instance and the
migration job can be safely deleted.
[[["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 2025-08-26 UTC."],[[["\u003cp\u003eFinalize a continuous migration job via the "Promote" button on the migration job details page to clean temporary data and start using the destination cluster.\u003c/p\u003e\n"],["\u003cp\u003eBefore finalizing, use the Data Validation Tool to monitor the replication delay, aiming for a minimal delay in minutes or seconds.\u003c/p\u003e\n"],["\u003cp\u003eTo prevent data loss, halt all write operations, scripts, and client connections to the source database, marking the start of the downtime period.\u003c/p\u003e\n"],["\u003cp\u003eThe migration job should have zero replication delay before finalizing, though finalizing with a non-zero delay is possible, impacting the data accuracy in the destination.\u003c/p\u003e\n"],["\u003cp\u003eOnce promoted, the destination AlloyDB for PostgreSQL cluster is ready for application use, and the completed migration job can be deleted.\u003c/p\u003e\n"]]],[],null,["# Finalize a migration\n\nFor continuous migrations, you can initiate the promotion process\nafter it's time to move reads and writes to the destination databases.\nPromotion means that Database Migration Service disconnects from your source database,\nstops replicating change data events to the destination database,\nand cleans up all the temporary migration data.\n\n1. Optional: [Verify migration data](/database-migration/docs/oracle-to-alloydb/verify-migration) for completeness.\n2. Stop all writes, running scripts, and client connections to the source database. The downtime period begins here.\n3. Observe the [replication delay metric](/database-migration/docs/oracle-to-alloydb/migration-job-metrics#replication_delay) and wait for it to trend down significantly, ideally on the order of minutes or seconds.\n4. Perform the promote action on the migration job.\n\n ### Console\n\n 1. In the Google Cloud console, go to the **Migration jobs** page.\n\n [Go to Migration jobs](https://console.cloud.google.com/dbmigration/migrations)\n 2. In the **Jobs** tab, click the display name of the migration job that you want to promote.\n\n The migration job details page opens.\n 3. Click **Promote**.\n 4. In the dialog, click **Promote**.\n\n ### gcloud\n\n\n Before using any of the command data below,\n make the following replacements:\n - \u003cvar class=\"edit\" scope=\"MIGRATION_JOB_ID\" translate=\"no\"\u003eMIGRATION_JOB_ID\u003c/var\u003e with your migration job identifier.\n\n If you don't know the identifier, you can use the\n [`gcloud database-migration migration-jobs list`](/sdk/gcloud/reference/database-migration/migration-jobs/list) command to list all\n migration jobs in a given region and view their identifiers.\n - \u003cvar class=\"edit\" scope=\"REGION\" translate=\"no\"\u003eREGION\u003c/var\u003e with the identifier of the region where your connection profile is saved.\n - Optional: Database Migration Service migrates all databases in your source by default. If you want to migrate only specific databases,\n use the `--databases-filter` flag and specify their identifiers as a comma-separated list.\n\n For example: `--databases-filter=my-business-database,my-other-database`\n\n You can later edit migration jobs that you created with the `--database-filter flag`\n by using the [`gcloud database-migration migration-jobs update`](/sdk/gcloud/reference/database-migration/migration-jobs/update) command.\n\n\n Execute the\n\n following\n\n command:\n\n #### Linux, macOS, or Cloud Shell\n\n **Note:** Ensure you have initialized the Google Cloud CLI with authentication and a project by running either [gcloud init](/sdk/gcloud/reference/init); or [gcloud auth login](/sdk/gcloud/reference/auth/login) and [gcloud config set project](/sdk/gcloud/reference/config/set). \n\n ```bash\n gcloud database-migration migration-jobs \\\n promote MIGRATION_JOB_ID \\\n --region=REGION\n ```\n\n #### Windows (PowerShell)\n\n **Note:** Ensure you have initialized the Google Cloud CLI with authentication and a project by running either [gcloud init](/sdk/gcloud/reference/init); or [gcloud auth login](/sdk/gcloud/reference/auth/login) and [gcloud config set project](/sdk/gcloud/reference/config/set). \n\n ```bash\n gcloud database-migration migration-jobs `\n promote MIGRATION_JOB_ID `\n --region=REGION\n ```\n\n #### Windows (cmd.exe)\n\n **Note:** Ensure you have initialized the Google Cloud CLI with authentication and a project by running either [gcloud init](/sdk/gcloud/reference/init); or [gcloud auth login](/sdk/gcloud/reference/auth/login) and [gcloud config set project](/sdk/gcloud/reference/config/set). \n\n ```bash\n gcloud database-migration migration-jobs ^\n promote MIGRATION_JOB_ID ^\n --region=REGION\n ```\n\n #### Result\n\n\n The action is performed in an asynchronous manner.\n As such, this command returns an\n [Operation entity](/database-migration/docs/reference/rest/v1/projects.locations.operations) that represents a long-running operation:\n\n ```\n done: false\n metadata:\n '@type': type.googleapis.com/google.cloud.clouddms.v1.OperationMetadata\n apiVersion: v1\n createTime: '2024-02-20T12:20:24.493106418Z'\n requestedCancellation: false\n target: MIGRATION_JOB_ID\n verb: start\n name: OPERATION_ID\n ```\n To see if your operation is successful, you can query the returned operation object, or check the status of the migration job:\n - Use the [`gcloud database-migration migration-jobs describe`](/sdk/gcloud/reference/database-migration/migration-jobs/describe) command to view the status of the migration job.\n - Use the [`gcloud database-migration operations describe`](/sdk/gcloud/reference/database-migration/operations/describe) with the \u003cvar translate=\"no\"\u003eOPERATION_ID\u003c/var\u003e to see the status of the operation itself.\n5. The destination instance is promoted, and your migrated databases are now accessible for all read and write operations. The migration job status changes to `Completed`.\n6. The application can now be connected to the AlloyDB for PostgreSQL instance and the migration job can be safely deleted."]]