For heterogeneous SQL Server to Cloud SQL for PostgreSQL migrations, you can monitor and manage your migration progress for the whole migration job, or for individual tables included in the migration job.
This page describes the actions you can take at each level. For more information, see the Manage migration jobs and Manage individual tables sections.
Manage migration jobs
In the Google Cloud console, you can perform actions in bulk for migration jobs that have the same status. You can perform actions on a single migration job both in the Google Cloud console (either from the Database Migration Service console or directly from the destination Cloud SQL instance page) and by using Google Cloud CLI.
You can perform any of the following actions on your migration job:
| Action | Description |
|---|---|
| Start | Start migration jobs is that aren't in the Running or Starting state. See Migration job statuses. |
| Stop | Stop a running migration job. The data movement is paused.
The migration job status first changes to Stopping
and then to Stopped. You can
resume, delete, or
promote a stopped migration job.
For continuous migrations: In some cases, the source database must retain the data until you resume the migration job. The retention period for the source database may be limited. If the migration job is paused for longer than the retention period, and then the migration job is resumed, this can cause the migration job to fail. If this occurs, then delete or restart the migration job. |
| Resume | When you resume a migration job, Database Migration Service resumes the data
movement operations:
|
| Restart |
You can restart a migration job that encountered an error and can't proceed with data replication. The result of restarting a migration job depends on why it failed:
|
| Edit | See Edit a migration job. |
| Delete | A migration job can be deleted. The outcome depends on the status of
the job:
|
| Promote | During the migration process, your destination database is put into a read-only state where it is fully managed by Database Migration Service. When you want to switch your application to the migrated destination database, promoting the migration job updates the destination database into a standalone replica. See Promote a migration. |
Review a migration job
- In the Google Cloud console, go to the Migration jobs page.
- Select a migration job to see its details page, which includes:
- Migration job metadata, such as the display name, ID, migration type, source connection profile, source database engine, destination, connectivity method, date and time that the migration job was created, and how long the migration job is running.
- Migration job status and substatus, and additional information. Different actions are available depending on the migration job's status and substatus.
Start a migration job
When your migration job is fully created (that is, it isn't saved in a draft state), you can start it at any time to begin migrating data.
To start a migration job, perform the following steps:
Console
You can start a migration job from the Database Migration Service console or from the destination instance page.
From the Database Migration Service console:
- In the Google Cloud console, go to the Migration jobs page.
- In the Jobs tab, click the display name of the migration job
that you want to start.
The migration job details page opens.
- Click Start.
- In the dialog, click Start.
From the destination instance:
- In the Google Cloud console, go to the Cloud SQL Instances page.
- Click the display name of the destination instance for your migration.
The instance details page opens.
- In the Migration section, click Start.
- In the dialog, click Start.
gcloud
Before using any of the command data below, make the following replacements:
- MIGRATION_JOB_ID with
your migration job identifier.
If you don't know the identifier, you can use the
gcloud database-migration migration-jobs listcommand to list all migration jobs in a given region and view their identifiers. - REGION with the identifier of the region where your migration job is saved.
Execute the following command:
Linux, macOS, or Cloud Shell
gcloud database-migration migration-jobs \ start MIGRATION_JOB_ID \ --region=REGION
Windows (PowerShell)
gcloud database-migration migration-jobs ` start MIGRATION_JOB_ID ` --region=REGION
Windows (cmd.exe)
gcloud database-migration migration-jobs ^ start MIGRATION_JOB_ID ^ --region=REGION
Result
The action is performed in an asynchronous manner. As such, this command returns an Operation entity that represents a long-running operation:
done: false metadata: '@type': type.googleapis.com/google.cloud.clouddms.v1.OperationMetadata apiVersion: v1 createTime: '2024-02-20T12:20:24.493106418Z' requestedCancellation: false target: MIGRATION_JOB_ID verb: start name: OPERATION_ID
To see if your operation is successful, you can query the returned operation object, or check the status of the migration job:
- Use the
gcloud database-migration migration-jobs describecommand to view the status of the migration job. - Use the
gcloud database-migration operations describewith the OPERATION_ID to see the status of the operation itself.
Stop a migration job
You can stop a running migration job at any time by performing the following steps:
Console
You can stop a migration job from the Database Migration Service console or from the destination instance page.
From the Database Migration Service console:
- In the Google Cloud console, go to the Migration jobs page.
- In the Jobs tab, click the display name of the migration job
that you want to stop.
The migration job details page opens.
- Click Stop.
- In the dialog, click Stop.
From the destination instance:
- In the Google Cloud console, go to the Cloud SQL Instances page.
- Click the display name of the destination instance for your migration.
The instance details page opens.
- In the Migration section, click Stop.
- In the dialog, click Stop.
gcloud
Before using any of the command data below, make the following replacements:
- MIGRATION_JOB_ID with
your migration job identifier.
If you don't know the identifier, you can use the
gcloud database-migration migration-jobs listcommand to list all migration jobs in a given region and view their identifiers. - REGION with the identifier of the region where your connection profile is saved.
Execute the following command:
Linux, macOS, or Cloud Shell
gcloud database-migration migration-jobs \ stop MIGRATION_JOB_ID \ --region=REGION
Windows (PowerShell)
gcloud database-migration migration-jobs ` stop MIGRATION_JOB_ID ` --region=REGION
Windows (cmd.exe)
gcloud database-migration migration-jobs ^ stop MIGRATION_JOB_ID ^ --region=REGION
Result
The action is performed in an asynchronous manner. As such, this command returns an Operation entity that represents a long-running operation:
done: false metadata: '@type': type.googleapis.com/google.cloud.clouddms.v1.OperationMetadata apiVersion: v1 createTime: '2024-02-20T12:20:24.493106418Z' requestedCancellation: false target: MIGRATION_JOB_ID verb: stop name: OPERATION_ID
- Use the
gcloud database-migration migration-jobs describecommand to view the status of the migration job. - Use the
gcloud database-migration operations describewith the OPERATION_ID to see the status of the operation itself.
Resume a migration job
You can resume a stopped migration job by performing the following steps:
Console
You can resume a migration job from the Database Migration Service console or from the destination instance page.
From the Database Migration Service console:
- In the Google Cloud console, go to the Migration jobs page.