Question 845 of 1,446
Migrate to Cloud SQL with Minimal Downtime Using Database Migration Service
A company is migrating an on-premises PostgreSQL database to Cloud SQL. The database is 2 TB and must have minimal downtime during migration. Which migration strategy should the Database Engineer recommend?
Quick Answer
The answer is to use Database Migration Service with continuous replication for a homogeneous migration to Cloud SQL with minimal downtime. This is correct because DMS leverages PostgreSQL’s native logical replication or pglogical to keep the on-premises source database fully operational while changes stream continuously to Cloud SQL, allowing the final cutover to complete in seconds or minutes regardless of the 2 TB size. On the Google Professional Cloud Database Engineer exam, this scenario tests your understanding of DMS’s continuous replication capability versus offline dump-and-load methods, which would cause unacceptable downtime for large databases. A common trap is choosing a one-time export/import approach, but the key is recognizing that DMS’s ongoing sync eliminates the need for a long maintenance window. Memory tip: think “DMS = Data Mirrors Sync” to remember that continuous replication keeps source and target aligned until cutover.
⚠ Common exam trap
Google Cloud often tests the distinction between tools that require downtime (like pg_dump/pg_restore) and services that support continuous replication (like DMS), and the trap here is that candidates may assume Cloud SQL's built-in replication can connect to any external database, when in fact it is limited to inter-instance replication within Google Cloud.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use Database Migration Service to set up continuous replication from the on-premises database to Cloud SQL, then perform a minimal-downtime cutover.
The Database Migration Service (DMS) supports continuous replication from an on-premises PostgreSQL database to Cloud SQL using logical replication (pglogical or native PostgreSQL logical replication). This allows the source database to remain operational during the migration, and the cutover to Cloud SQL can be performed with minimal downtime, typically seconds to minutes, meeting the 2 TB size and low-downtime requirements.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Export the database using pg_dump and import into Cloud SQL using pg_restore during a maintenance window.
Why it's wrong here
This approach causes significant downtime and is not optimal for minimal downtime migration.
- ✗
Set up PostgreSQL on Compute Engine and replicate data, then switch over to Cloud SQL.
Why it's wrong here
This adds unnecessary complexity and does not directly migrate to Cloud SQL.
- ✓
Use Database Migration Service to set up continuous replication from the on-premises database to Cloud SQL, then perform a minimal-downtime cutover.
Why this is correct
Database Migration Service supports minimal-downtime migrations using continuous replication.
- ✗
Use Cloud SQL's built-in replication feature to connect directly to the on-premises database.
Why it's wrong here
Cloud SQL does not support direct replication from on-premises sources.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
4 more ways this is tested on PCDE
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A company is migrating their on-premises MySQL database to Cloud SQL. The database is 500 GB and they have a 1 Gbps network connection. They want to minimize downtime. Which THREE steps should they take?
medium- ✓ A.Perform a test migration to validate the process.
- B.Export the database to a SQL file and import after the cutover.
- ✓ C.Test the application against the new Cloud SQL instance.
- ✓ D.Use Database Migration Service with continuous replication.
- E.Schedule a maintenance window for the cutover.
Why A: Performing a test migration validates the entire process, including schema compatibility, data integrity, and application connectivity, before the actual cutover. This reduces the risk of unexpected failures during the production migration, which is critical for minimizing downtime. A test migration also helps estimate the time required for the final cutover and allows for tuning of the Database Migration Service settings.
Variation 2. A company wants to migrate a 100 GB MySQL database to Cloud SQL with minimal application changes. Which migration tool should they use?
easy- A.mysqldump
- ✓ B.Database Migration Service
- C.BigQuery Data Transfer Service
- D.Storage Transfer Service
Why B: Database Migration Service (DMS) is the correct tool because it is designed specifically for migrating databases to Cloud SQL with minimal downtime and minimal application changes. DMS uses a combination of initial snapshot and continuous change data capture (CDC) to replicate the source MySQL database to Cloud SQL, allowing the application to point to the new database with only a connection string update.
Variation 3. A company is migrating an on-premises PostgreSQL database to Cloud SQL. They need to minimize downtime during migration. Which TWO steps should they take?
medium- ✓ A.Set up a read replica for switchover
- B.Use pg_dump and restore
- C.Enable automatic backups
- D.Configure a high-availability instance
- ✓ E.Use Database Migration Service with continuous replication
Why A: (Set up a read replica for switchover) minimizes downtime by allowing a near-instantaneous cutover: you can promote the read replica to primary with minimal interruption. Option E (Use Database Migration Service with continuous replication) synchronizes changes in real time, enabling a controlled switchover with very low downtime. Option B (pg_dump and restore) involves exporting and importing data, which requires taking the source database offline or operating in read-only mode, causing significant downtime. Option C (Enable automatic backups) is a backup strategy that does not directly address migration downtime. Option D (Configure a high-availability instance) is post-migration configuration for resilience, not a step that reduces downtime during the migration.
Variation 4. A company is migrating its on-premises PostgreSQL database to Cloud SQL for PostgreSQL. They want to minimize downtime during the migration. Which TWO actions should they take?
medium- A.Increase the disk size of the Cloud SQL instance before migration to improve performance.
- B.Use pg_dump to export the database and pg_restore to import into Cloud SQL.
- ✓ C.Set up a Cloud SQL read replica and promote it to the primary after migration.
- D.Decrease max_connections to reduce load during migration.
- ✓ E.Use Database Migration Service (DMS) with continuous replication from the source.
Why C: Setting up a Cloud SQL read replica from the source PostgreSQL database and then promoting it to primary allows for a controlled cutover with minimal downtime. The replica stays in sync with the source using PostgreSQL's native streaming replication, and promotion is a fast metadata operation that typically takes seconds, not minutes or hours.
Last reviewed: Jun 30, 2026
This PCDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCDE exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.