Finalize a migration

For continuous migrations, finalize the migration job when you want to start using your destination cluster for your application.

You can use the Promote button on the migration job details page to have Database Migration Service clean up all the temporary migration data and promote your destination cluster.

To finalize a migration, do the following:

  1. Go to Migration jobs in the Google Cloud console.

    Go to the Migration jobs

  2. Click the migration job that represents the migration that you want to finalize. The migration job details page appears.

  3. Use the Data Validation Tool to track the replication delay by checking row counts.

    Wait for the replication delay to trend down significantly, ideally on the order of minutes or seconds. The replication delay is available for review on the migration job details page.

  4. After the replication delay is at a minimum, prepare for promotion. To avoid data loss, make sure to:

    1. Stop all writes, running scripts, and client connections to the source database. The downtime period begins here.

    2. Wait until the replication delay is at zero, which means that the migration job has processed all outstanding changes.

    You can finalize a migration even if the replication delay isn't at zero. This can reduce the database downtime, but may affect the accuracy of the data in the destination.

  5. On the migration job details page, click Promote, and then confirm the action in the Promote migration job? window.

    The migration job stops reading from your source database. Database Migration Service promotes your AlloyDB for PostgreSQL destination to clean up all the temporary migration data. This process can take several minutes.

  6. When the promotion process is complete, the migration job status changes to Completed.

  7. You can now connect your application to the destination AlloyDB for PostgreSQL instance and safely delete the migration job.