Manage migration jobs

Actions can be performed from the migration jobs list, or from the single migration page. Performing an action on multiple jobs simultaneously is possible on migration jobs that all have the same status.

User Action Description
Start For migrations jobs that were created without being started, they can be started.
Stop A running migration job can be stopped at any time:
  • In full dump phase, the dump is halted and the job status changes to stopping and subsequently to stopped in full dump. It can now be deleted or restarted.
  • In the CDC phase, the replication is stopped. It can now be deleted or resumed.
Resume

In the case where a migration was stopped during the CDC phase, it can be resumed. Resuming the migration job will resume replication of the events that were accumulated during the stopped time.

If the time period between stopping the replication and resuming it is too long, the log position may be lost and the migration job will need to be deleted and/or re-created.

Restart If the migration failed and is not recoverable, or was stopped during full dump, it can be restarted from the beginning. Restarting the migration will wipe all data from the destination instance, then the migration will restart immediately, including with a new dump. If the dump was manually provided, it's highly likely that the restart will fail as the dump will be out of date.
Delete A migration job can be deleted. The outcome is dependent on the status of the job:
  • If the migration job status was "Completed", the record is deleted from the migration job list.
  • If the migration job was in any other status, there's an option to choose to delete the destination Cloud SQL instance and primary pair also.
  • Stop the migration if it's currently running.
Promote See Promote a migration job

Promote a migration job

In the case of continuous migrations, the promotion process can be initiated once it's time to move reads and writes to the destination. In a one-time migration, the Cloud SQL instance is ready as soon as dump/load is complete, and user-invoked promotion is not required.

Behind the scenes, promotion means that the destination Cloud SQL instance is disconnected from the source, and is promoted from replica to standalone primary.

To perform a loss-less promotion

  1. Once the full dump phase has completed and the migration job is in CDC phase, the option for promotion is available.

  2. Immediately after transitioning to the CDC phase, depending on the size of the dump, there may be a long replication delay as the Cloud SQL destination instance catches up on changes that occurred during the dump and load.

  3. 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.

  4. Once the replication delay is at a minimum, the promotion can be initiated. 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.

    3. Click Promote on the migration job.

  5. When invoked in the UI, a confirmation message is shown which reflects the current replication delay.

    The promotion can be performed even if the replication delay is not at zero. This can reduce the database downtime, but may affect the accuracy of the data in the destination.

  6. The migration job stops reading from the source and the sub-status is "Promotion in progress". The promotion process can't be stopped or undone.

  7. The destination instance is promoted to the primary writeable instance. Migration job status is "Completed".

  8. The application(s) can now be connected to the Cloud SQL instance and the migration job can be safely deleted.

Migration jobs that have failed or were manually stopped during CDC phase can be promoted, but this may mean a gap between the data on the source and the destination.

Migration job status and actions

Not started Starting Running /Full dump Running/ CDC Stopped In CDC Stopped in full dump Stopping Failed Running/ Promote in progress Completed
Start Next status: starting → Running / Full dump in progress
Stop Next status: Stopping → Stopped in full dump Next status: Stopped in CDC
Delete Migration job deleted Migration job deleted, optionally Cloud SQL instance deleted Migration job deleted, optionally Cloud SQL instance deleted Migration job deleted, optionally Cloud SQL instance deleted Migration job deleted, optionally Cloud SQL instance deleted Migration job deleted, optionally Cloud SQL instance deleted Migration job deleted
Promote Next status: Running / Promote in progress → Completed Next status: Running / Promote in progress → Completed Relevant for failures during CDC. Next status: Running / Promote in progress → Completed
Resume Next status: Running / CDC in progress
Restart Next Status: Running /full dump in progress Next Status: Running /full dump in progress