Google Professional Cloud Database Engineer Question 220
Select 4Google Cloud PlatformYour company is migrating an on-premises MySQL database to Cloud SQL for MySQL. The database serves a critical e-commerce application, and downtime should be minimized. You need to plan the migration with a fallback strategy in case the migration fails. What steps should you include in your migration plan?
- A
Perform a schema conversion to ensure compatibility between the on-premises MySQL database and Cloud SQL for MySQL.
- B
Take a full backup of the on-premises database before starting the migration process.
- C
Migrate the database directly to Cloud SQL using a live cutover without testing the application.
- D
Set up a replication pipeline to sync changes from the on-premises database to Cloud SQL during the migration.
- E
Create a rollback plan to restore the on-premises database from the latest backup if the migration fails.
Show answer and explanation
Correct answers: A, B, D, E
Explanation
Database migration requires careful planning to ensure minimal downtime and a solid fallback strategy. Steps such as schema conversion, taking backups, setting up replication, and creating a rollback plan are critical to a successful migration. Direct live cutovers without testing introduce significant risks and should be avoided in critical environments.
- A. Correct.
Correct: Performing a schema conversion ensures that the database schema is compatible with Cloud SQL for MySQL, avoiding issues during migration.
- B. Correct.
Correct: Taking a full backup is essential for ensuring you can restore the database to its original state in case of unforeseen issues.
- C. Incorrect.
Incorrect: A live cutover without testing introduces significant risk and does not align with best practices for minimal downtime migrations.
- D. Correct.
Correct: Setting up a replication pipeline allows you to sync changes during migration, minimizing downtime and ensuring data consistency.
- E. Correct.
Correct: A rollback plan ensures that the on-premises database can be restored quickly in case the migration fails, providing a reliable fallback strategy.