Learning Objectives
By the end of this chapter, you will be able to:
- Pick a migration strategy that matches the downtime tolerance, RPO, and operational complexity an application can absorb during cutover.
- Design and execute a Database Migration Service job for a homogeneous source-to-target pair, including pre-flight assessment, full dump, CDC catch-up, and promotion.
- Architect reverse replication from a Google Cloud target back to the original source so that a regression can be unwound without data loss.
- Plan a schema conversion across dialect boundaries (Oracle to PostgreSQL, SQL Server to PostgreSQL, MySQL to PostgreSQL) using Ora2pg, SSMA, and pgloader where each fits.
- Choose between Database Migration Service, Datastream, Storage Transfer Service, the native engine
pg_dump/mysqldump/bcptooling, AlloyDB Omni staging, and partner ISV stacks for a given scenario.
Executive Summary
- Migration is a sequence of three time-windowed phases (initial load, CDC catch-up, cutover) layered on top of a fallback strategy that decides what happens if the target misbehaves after switchover.
- Downtime tolerance is the single biggest design driver: zero-downtime relies on CDC and a brief read-only freeze; near-zero-downtime accepts a few minutes of write outage; extended-outage trades hours of downtime for the simplest dump-and-restore mechanics.
- Tool selection follows engine pairing and acceptable downtime: Database Migration Service for homogeneous PostgreSQL, MySQL, SQL Server, and Oracle-to-PostgreSQL (with the Oracle variant in preview during the syllabus lifecycle); Datastream for analytics-side CDC into BigQuery, Cloud Storage, or Pub/Sub; partner tooling for cross-engine OLTP.
- Schema conversion is its own project: data-type mapping, DDL translation, stored procedure rewrite, and application SQL re-test commonly consume more calendar time than the data move itself.
- Reverse replication makes a one-way migration reversible: a CDC stream pointed from Cloud SQL or AlloyDB back to the original source keeps the legacy system warm so the application can re-cut over within the rollback window without losing transactions captured on Google Cloud.
Assumptions
- The reader holds the IAM, networking, and engine choice context established in the design and operations chapters, including the Cloud SQL Auth Proxy, AlloyDB Auth Proxy, Private Service Connect, and CMEK primitives. Those terms are used without re-definition.
- The target engines under discussion are the managed Google Cloud services (Cloud SQL for PostgreSQL, MySQL, and SQL Server; AlloyDB for PostgreSQL; Spanner; Bigtable; Firestore); cross-cloud or self-managed targets on Compute Engine are mentioned only where partner tooling routes through them.
- Where a Database Migration Service capability is documented as preview, the chapter labels it inline and treats the GA homogeneous paths as the default examples.
