Migration is a process of moving data and metadata from a source database to a destination database. After your migration is completed, the destination database becomes the primary database that dependent applications can read and write to, and the source database can be shut down.
Database Migration Service helps you migrate your data to Google Cloud. The service supports database migrations into Cloud SQL and AlloyDB for PostgreSQL instances. Database Migration Service streamlines networking, manages the initial snapshot and ongoing replication, and provides status updates throughout the migration process.
With Database Migration Service, you can:
- Perform different types of migrations.
- Move your databases to Google Cloud with minimal downtime.
- Use Gemini-assisted conversion features in heterogeneous migrations.
- Migrate encrypted data securely.
Migration types
Continuous migration
Continuous (sometimes referred to as ongoing or online) migration is a continuous flow of changes from your source to your destination that follows an initial full dump and load. When the destination is ready for reads and writes, you finalize replication between the source and the destination. The destination Cloud SQL instance or AlloyDB for PostgreSQL cluster is then ready to be used as a standalone primary instance. Doing the switch when the source and destination are in sync gives you minimal downtime.
One-time migration
A one-time migration is a single point-in-time snapshot of the database. Database Migration Service takes the snapshot from the source and applies it to the destination. This process is a dump and load, where the destination is ready to be used when the load completes. Any applications that depend on the source database can experience downtime during the migration process because there can be no new writes to this database while the migration is in progress.
Homogeneous migrations
Homogeneous migrations take place when you migrate data between the same database technology. For example, from MySQL to Cloud SQL for MySQL or from PostgreSQL to Cloud SQL for PostgreSQL or AlloyDB for PostgreSQL. For more information, see Homogeneous migrations.
Heterogeneous migrations
Unlike homogeneous migrations, in heterogeneous migrations, such as Oracle to Cloud SQL for PostgreSQL, the database technology of the source and destination are different. For more information, see Heterogeneous migrations.
Minimal downtime
Database Migration Service supports low downtime, continuous, serverless migrations for both homogeneous and heterogeneous migrations. The serverless architecture of Database Migration Service takes an initial snapshot of the source database to capture the current state of the data. Once the snapshot is complete, Database Migration Service loads the snapshot onto the destination database, and continuous data replication begins. Data replication is a continuous operation because it tracks and copies any changes made to the original database in real-time. It is based on Change Data Capture (CDC), a process that identifies and captures only the changes, such as inserts, updates, deletes that you made to the database after the initial snapshot is taken.
Such an approach minimises downtime for the following reasons:
- Continuous replication is more efficient than replicating the entire database frequently, as it only focuses on modifications.
- Data migrates while the source database remains operational.
- Serverless migrations perform highly at scale.
Conversion workspaces
For heterogeneous migrations, Database Migration Service converts the schema and objects from your source database into a format that is compatible with your destination database. Conversion workspaces offer the following features:
- Initial schema conversion that happens automatically, once you create your conversion workspace.
- The interactive SQL editor that helps you fix conversion issues or adjust the schema to better fit your needs.
- Assistance of Gemini conversion features.
- Customization directives that you can use to override the rules of automated schema conversion.
For more information about conversion workspaces, see the conversion workspaces pages that apply to your migration scenario.
Security and encryption
Database Migration Service migrates data securely by using SSL/TLS certificates to encrypt network connections and customer-managed encryption keys (CMEK) for continuous migrations.
For more information about encryption, see pages on creating connection profiles and migration jobs that apply to your migration scenario.
Use cases
Database Migration Service enables the following use cases:
Lift-and-shift migration to a managed service
As part of an organization's move to Google Cloud, you can move from VM-based self-hosted databases to managed database cloud services. This lets you focus on the high availability, disaster recovery, and performance of running databases on managed services, instead of managing the infrastructure.
Multi-cloud continuous replication
Much like the read replicas across regions, if data exists in another cloud provider, a migration job can continuously replicate the database into Google Cloud for multi-cloud read-availability. Database Migration Service doesn't support a dual-write scenario, that is writing to and reading from both the source and destination.
What's next
Go to your migration scenario:
- Migrate to Cloud SQL for MySQL
- Migrate to Cloud SQL for PostgreSQL
- Migrate to AlloyDB for PostgreSQL
- Migrate to Cloud SQL for SQL Server
- Migrate from Oracle to Cloud SQL for PostgreSQL
- Migrate from Oracle to AlloyDB for PostgreSQL
- Migrate from SQL Server to Cloud SQL for PostgreSQL
- Migrate from SQL Server to AlloyDB for PostgreSQL