Google Professional Cloud Database Engineer Question 209
Select 3Google Cloud PlatformYour company is planning to migrate a mission-critical MySQL database hosted in an on-premises data center to Cloud SQL for MySQL on Google Cloud. The database is expected to handle continuous read and write operations 24/7, and downtime is unacceptable. Which of the following strategies should you implement for a near-zero downtime migration?
- A
Use Database Migration Service (DMS) to perform a continuous replication of the database.
- B
Export the on-premises database data to a file and import it into Cloud SQL during a scheduled downtime window.
- C
Configure Cloud SQL as a replica of the on-premises database using a replication setup, and then promote it to a primary instance.
- D
Stop all write operations on the on-premises database, perform a full backup, restore it in Cloud SQL, and then resume operations.
- E
Leverage Change Data Capture (CDC) tools to sync ongoing changes between the on-premises database and Cloud SQL.
Show answer and explanation
Correct answers: A, C, E
Explanation
Near-zero downtime migration strategies focus on keeping the source database operational during the migration process while ensuring data consistency in the target database. Both Database Migration Service (DMS) and Change Data Capture (CDC) enable real-time replication, ensuring minimal interruption to services. Configuring Cloud SQL as a replica allows for seamless transition with near-zero downtime when the replica is promoted to primary.
- A. Correct.
Correct: Database Migration Service (DMS) provides continuous replication capabilities that allow you to migrate an on-premises MySQL database with minimal downtime.
- B. Incorrect.
Incorrect: Exporting and importing data requires a complete halt in database operations, making it unsuitable for near-zero downtime migrations.
- C. Correct.
Correct: Configuring Cloud SQL as a replica of the on-premises database ensures ongoing replication of data while the source database remains operational. Once the data is fully synced, you can promote the replica to primary without significant downtime.
- D. Incorrect.
Incorrect: Stopping all write operations for a full backup and restore introduces significant downtime, which is not suitable for a near-zero downtime migration.
- E. Correct.
Correct: Change Data Capture (CDC) tools can be used to replicate changes in real-time from the on-premises database to Cloud SQL, enabling near-zero downtime migrations.