Google Professional Cloud Database Engineer Question 224
Select 2Google Cloud PlatformYou are tasked with migrating a large PostgreSQL database from an on-premises data center to Cloud SQL for PostgreSQL on Google Cloud. The database is critical to your business, so minimizing downtime during the migration is essential. Additionally, you need to ensure data consistency throughout the process. Which tool or tools should you use for this migration?
- A
Database Migration Service (DMS)
- B
pg_dump and pg_restore
- C
Cloud Storage Transfer Service
- D
Third-party tools like Striim or Datastream
Show answer and explanation
Correct answers: A, D
Explanation
For migrating a critical PostgreSQL database with minimal downtime and ensuring data consistency, Database Migration Service (DMS) is the recommended tool as it is purpose-built for this task and integrates seamlessly with Cloud SQL. Third-party tools like Striim or Datastream can also be considered for similar requirements but may involve additional setup and costs. Tools like pg_dump/pg_restore or Cloud Storage Transfer Service are unsuitable for low-downtime database migrations.
- A. Correct.
Database Migration Service (DMS) is the ideal choice for migrating a PostgreSQL database to Cloud SQL for PostgreSQL, especially when minimizing downtime and ensuring data consistency. It provides features like continuous replication and automatic schema conversion.
- B. Incorrect.
pg_dump and pg_restore are not suitable for scenarios requiring minimal downtime because they perform a full dump and restore, which can be time-consuming and requires the database to be offline during the migration.
- C. Incorrect.
Cloud Storage Transfer Service is used to migrate files and objects between storage environments, but it is not designed for database migrations.
- D. Correct.
Third-party tools like Striim or Datastream can be used to achieve minimal downtime by enabling continuous data replication during the migration process. However, they may require additional configuration and licensing.