Migrating a PostgreSQL Database From Google Cloud to DigitalOcean | by Meriç Melike Yılmaz | Mar, 2022

And why we made that change

Photograph by Tatum Bergen on Unsplash
DigitalOcean database overview display screen — Screenshot by creator

Minimal setup is simply too pricey on GCP

Our DB specs on GCP — Screenshot by creator

GCP Billing Construction Did Not Work For Us

DigitalOcean Docs Are Extra Newbie-Pleasant

1. Create PostgreSQL Database Occasion in DigitalOcean

2. Cease the Providers

3. Export GCP Database

GCP SQL, Export button on DB overview display screen — Screenshot by creator

4. Restore the dump into our new DB in DO

PGPASSWORD=[psql-password] psql -U [psql-username] -h [psql-host] -p [psql-port] -d [database] --set=sslmode=require -f [path-to-sql-dump]

5. Change connection parameters in our providers to make use of new DB

6. Restart our providers

Bonus: Optimize & Safe Your Database

More Posts