Topic 1 Question 126
You are migrating your 2 TB on-premises PostgreSQL cluster to Compute Engine. You want to set up your new environment in an Ubuntu virtual machine instance in Google Cloud and seed the data to a new instance. You need to plan your database migration to ensure minimum downtime. What should you do?
- Take a full export while the database is offline.
- Create a bucket in Cloud Storage.
- Transfer the dump file to the bucket you just created.
- Import the dump file into the Google Cloud primary server. B.1. Take a full export while the database is offline.
- Create a bucket in Cloud Storage.
- Transfer the dump file to the bucket you just created.
- Restore the backup into the Google Cloud primary server.
- Take a full backup while the database is online.
- Create a bucket in Cloud Storage.
- Transfer the backup to the bucket you just created.
- Restore the backup into the Google Cloud primary server.
- Create a recovery.conf file in the $PG_DATA directory.
- Stop the source database.
- Transfer the write ahead logs to the bucket you created before.
- Start the PostgreSQL service.
- Wait until Google Cloud primary server syncs with the running primary server.
- Take a full export while the database is online.
- Create a bucket in Cloud Storage.
- Transfer the dump file and write-ahead logs to the bucket you just created.
- Restore the dump file into the Google Cloud primary server.
- Create a recovery.conf file in the $PG_DATA directory.
- Stop the source database.
- Transfer the write-ahead logs to the bucket you created before.
- Start the PostgreSQL service.
- Wait until the Google Cloud primary server syncs with the running primary server.
γ³γ‘γ³γ(2)
C. Full exports are not possible offline. Eliminate A and B. Migrating to GCE means you can't use the Database Migration Service. Note, Datastream CDC only supports MySQL and Oracle. To seed the PostgreSQL instance in GCE, a backup is needed created using pg_basebackup. An export won't cut it. That eliminates D and leaves C. Those 9 steps actually make sense.
π 2dynamic_dba2023/03/27C, Its to take full backup not full export in this case.
π 1AnilKr2023/03/23
γ·γ£γγγ«γ’γΌγ