Migrate to Cloud SQL for PostgreSQL using Database Migration Service GSP918



Migrate to Cloud SQL for PostgreSQL using Database Migration Service GSP918

Migrate to Cloud SQL for PostgreSQL using Database Migration Service GSP918

Overview
Database Migration Service provides options for one-time and continuous jobs to migrate data to Cloud SQL using different connectivity options, including IP allowlists, VPC peering, and reverse SSH tunnels (see documentation on connectivity options at https://cloud.google.com/database-migration/docs/postgresql/configure-connectivity.

In this lab, you migrate a stand-alone PostgreSQL database (running on a virtual machine) to Cloud SQL for PostgreSQL using a continuous Database Migration Service job and VPC peering for connectivity.

Migrating a database via Database Migration Service requires some preparation of the source database, including creating a dedicated user with replication rights, adding the pglogical database extension to the source database and granting rights to the schemata and tables in the database to be migrated, as well as the postgres database, to that user.

After you create and run the migration job, you confirm that an initial copy of your database has been successfully migrated to your Cloud SQL for PostgreSQL instance. You also explore how continuous migration jobs apply data updates from your source database to your Cloud SQL instance. To conclude the migration job, you promote the Cloud SQL instance to be a stand-alone database for reading and writing data.

Objectives
In this lab, you learn how to configure a continuous Database Migration Service job to migrate databases from a PostgreSQL instance to Cloud SQL for PostgreSQL.
– Prepare the source database for migration.
– Create a profile for a source connection to a PostgreSQL instance (e.g., stand-alone PostgreSQL).
– Configure connectivity between the source and destination database instances using VPC peering.
– Configure firewall and database access rules to allow access to the source database for migration.
– Create, run, and verify a continuous migration job using Database Migration Service.
– Promote the destination instance (Cloud SQL for PostgreSQL) to be a stand-alone database for reading and writing data.
#gcp #googlecloud #qwiklabs #learntoearn