Soru

Zorluk: OrtaDesigning Migration Plans and Data Transfer Strategies

An enterprise is planning a near-zero downtime database migration from an on-premises PostgreSQL database to Google Cloud SQL for PostgreSQL using Database Migration Service (DMS). Place the following migration steps in the correct chronological execution order from initial preparation to final cutover.

  1. 1Configure source database write-ahead logging (WAL) replication settings and establish secure private network connectivity to Google Cloud.
  2. 2Provision the target Cloud SQL for PostgreSQL instance and apply the schema DDL scripts matching the source environment.
  3. 3Start the Database Migration Service job to perform the initial full historical data snapshot transfer.
  4. 4Monitor real-time Change Data Capture (CDC) replication streams until replication latency drops near zero.
  5. 5Stop application writing traffic to the source database, verify zero remaining replication lag, promote Cloud SQL to primary, and update application endpoint connection strings.

Cevap

The correct sequential order for a Database Migration Service baseline and CDC workflow is: first configure source WAL and private network access, then provision Cloud SQL and establish schema structures, launch the initial full data snapshot transfer, monitor CDC replication latency until synced, and finally halt source writes, promote Cloud SQL, and update application connection endpoints.
A structured online migration requires enabling WAL logging and network connectivity first, provisioning the destination schema, running the full baseline dump via DMS, monitoring CDC until lag reaches near zero, and performing final application cutover.

Adım Adım Çözüm

1
Configure network and source logging prerequisites
WAL and private connectivity ready for streaming
Database Migration Service requires network line-of-sight and WAL configuration to track change data.
2
Provision Cloud SQL instance and apply schema DDL
Target database ready to receive snapshot data
The destination database environment must be structured with matching schema DDL prior to snapshot ingestion.
3
Initiate snapshot data loading via DMS
Baseline historical dataset transferred to Cloud SQL
Initial full dump populates the baseline state before delta sync can occur.
4
Track continuous CDC stream lag
Target database continuously synced with ongoing source writes
Monitoring CDC lag ensures the destination is in sync prior to executing scheduled cutover windows.
5
Execute cutover and promote target instance
Application traffic directed to new Cloud SQL database
Pausing source writes and promoting target database completes the migration cleanly without missing data.

Anahtar Kavram

Homogeneous database migration sequencing using Google Cloud Database Migration Service (DMS) with continuous CDC.
Tahmini Süre:2m 0s
Bu soruyu puanla