Promotion means that the destination Cloud SQL instance is disconnected from
the source, and is promoted from a replica instance to a primary instance.
For continuous migrations, you can initiate the promotion process after it's time to move reads and writes to the destination.
For one-time migrations, the Cloud SQL instance is ready as soon as the dump and load is complete, and user-invoked promotion isn't required.To promote a migration without loss of information, follow these steps:
- Go to the Migration jobs page.
Click the migration job that represents the migration that you want to promote. The Migration job details page appears.
Immediately after transitioning to the CDC phase, depending on the size of the dump, there may be a long replication delay because the Cloud SQL destination instance catches up on changes that occurred during the dump and load.
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 page.
- After the replication delay is at a minimum, you can initiate the promotion.
To avoid data loss, make sure to:
- Stop all writes, running scripts, and client connections to the source database. The downtime period begins here.
- Wait until the replication delay is at zero, which means that the migration job has processed all outstanding changes.
- In the Migration job details page, click PROMOTE.
- In the Promote migration job? window, click PROMOTE.
- The migration job stops reading from the source and the substatus is
Promote in progress
. At this point, you cannot stop or undo the promotion process. - The destination instance is promoted to a primary writeable instance.
The migration job status is
Completed
. - The application can now be connected to the Cloud SQL instance and the migration job can be safely deleted.
After the full dump phase has completed and the migration job is in CDC phase, the option for promotion is available.
- When you promote migration jobs that have failed or were manually stopped during CDC phase, data on the source and the destination can be inconsistent.
- Promotion enables point-in-time recovery (PITR) on migrated instances, which can take the promotion process longer to complete.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-30 UTC.