When you use Database Migration Service, you can create the destination
Cloud SQL instance when you create a migration job.
Database Migration Service uses migration jobs to migrate data from your source database
instance to the destination Cloud SQL instance.
For more information, see
Create a migration job to a new destination instance.
However, you might want to create your destination Cloud SQL instance
outside of Database Migration Service. For example, you can use Terraform or
other Infrastructure-As-Code (IaC) tools. In that case, after creating the
Cloud SQL instance, you can still use Database Migration Service to migrate
data to it.
For more information, see
Create a migration job to an existing destination instance.
Replicate from an external server
Another option for migrating data from an external server
into Cloud SQL is to use replication.
Cloud SQL supports various replication modes
to migrate data into your instance.
Cloud SQL for MySQL also supports the migration of
external MySQL databases from Percona XtraBackup physical files.
By using physical files to set up replication instead
of logical dump files, you can migrate your external MySQL
databases into Cloud SQL for MySQL instances up to 3 times faster
than using logical dump files in a parallel migration and up to 10 times faster than using logical dump files in a single-threaded migration.
If your instance has customized backup settings (for example, a custom backup location), then after you promote the instance, we recommend that you customize your backup settings again. During the promotion process, Cloud SQL resets your backup settings to their default values.
[[["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-14 UTC."],[],[],null,["# About data migration in Cloud SQL\n\n\u003cbr /\u003e\n\nMySQL \\| [PostgreSQL](/sql/docs/postgres/migrate-data-to-cloud-sql-instance \"View this page for the PostgreSQL database engine\") \\| SQL Server\n\n\u003cbr /\u003e\n\nThis page describes data migration options in Cloud SQL.\n\nDatabase Migration Service\n--------------------------\n\nTo migrate data from an external server into Cloud SQL, you can use [Database Migration Service](/database-migration/docs/overview).\n\nWhen you use Database Migration Service, you can create the destination\nCloud SQL instance when you create a migration job.\nDatabase Migration Service uses migration jobs to migrate data from your source database\ninstance to the destination Cloud SQL instance.\nFor more information, see\n[Create a migration job to a new destination instance](/database-migration/docs/mysql/create-migration-job).\n\nHowever, you might want to create your destination Cloud SQL instance\noutside of Database Migration Service. For example, you can use Terraform or\nother Infrastructure-As-Code (IaC) tools. In that case, after creating the\nCloud SQL instance, you can still use Database Migration Service to migrate\ndata to it.\nFor more information, see\n[Create a migration job to an existing destination instance](/database-migration/docs/mysql/create-migration-job-existing-instance).\n\nReplicate from an external server\n---------------------------------\n\nAnother option for migrating data from an external server\ninto Cloud SQL is to use replication.\nCloud SQL supports various replication modes\nto migrate data into your instance.\n\nFor more information, see [About replicating from an external server](/sql/docs/mysql/replication/external-server).\n\nTo set up Cloud SQL for data migration by using replication, see [Configure Cloud SQL and the external server for replication](/sql/docs/mysql/replication/configure-replication-from-external).\nCloud SQL for MySQL also supports the migration of external MySQL databases from Percona XtraBackup physical files. By using physical files to set up replication instead of logical dump files, you can migrate your external MySQL databases into Cloud SQL for MySQL instances up to 3 times faster than using logical dump files in a parallel migration and up to 10 times faster than using logical dump files in a single-threaded migration.\n\n\u003cbr /\u003e\n\nFor more information, see\n[Migrate to Cloud SQL from an XtraBackup physical file](/sql/docs/mysql/migrate-xtrabackup-physical-file).\n\n\nLimitations\n-----------\n\n- If your instance has customized backup settings (for example, a [custom backup location](/sql/docs/mysql/backup-recovery/backing-up#locationbackups)), then after you promote the instance, we recommend that you customize your backup settings again. During the promotion process, Cloud SQL resets your backup settings to their default values."]]