Google Professional Cloud Database Engineer exam dumps

Google Professional Cloud Database Engineer practice question 152 of 259

Professional Cloud Database Engineer. Professional level, Google Cloud. Free question with the correct answer and a full explanation.

Google Professional Cloud Database Engineer Question 152

Select 3Google Cloud Platform

Your organization is migrating an on-premises PostgreSQL database to Google Cloud. You need to export the data from the on-premises database and import it into a Cloud SQL PostgreSQL instance with minimal downtime. Which of the following steps will ensure a successful migration?

  1. A

    Use the pg_dump utility to export the database and the gcloud sql import sql command to import it into the Cloud SQL instance.

  2. B

    Export the database using pg_dump with the --data-only flag and import it using gcloud sql import csv to handle large data efficiently.

  3. C

    Set up the Cloud SQL instance as a replica of the on-premises PostgreSQL database to migrate data with minimal downtime.

  4. D

    Use Database Migration Service (DMS) for PostgreSQL to perform a continuous migration and cutover with minimal downtime.

  5. E

    Directly copy the PostgreSQL data directory from the on-premises server to the Cloud SQL instance.

Show answer and explanation

Correct answers: A, C, D

Explanation

To ensure a successful migration of a PostgreSQL database to Cloud SQL with minimal downtime, you can use pg_dump for exporting and the gcloud sql import sql command for importing smaller databases. For minimal downtime, advanced solutions like setting up the Cloud SQL instance as a replica or using Database Migration Service (DMS) are recommended. Direct copying of data directories is not supported in Cloud SQL, and gcloud sql import csv is not compatible with pg_dump output.

  • A. Correct.

    Correct. Using pg_dump and gcloud sql import sql is a valid method for exporting and importing data, though it may result in longer downtime depending on the size of the database.

  • B. Incorrect.

    Incorrect. While pg_dump with the --data-only flag can export data, gcloud sql import csv is not suitable for importing the dump file from pg_dump. This method is incompatible.

  • C. Correct.

    Correct. Setting up the Cloud SQL instance as a read replica of the on-premises database allows replication of data with minimal downtime before cutting over.

  • D. Correct.

    Correct. Database Migration Service (DMS) is specifically designed for minimal downtime migrations and supports continuous data synchronization before the final cutover.

  • E. Incorrect.

    Incorrect. Directly copying the PostgreSQL data directory is not supported for Cloud SQL because of the differences in the underlying infrastructure and configurations.

Timed practice exam

Take a Google Professional Cloud Database Engineer practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam