Abstract


  • A popular relational database
  • Grab a free postgres db with Neon DB!
  • Obtain the Postgres Version using SELECT version();

Postgres Migration


Connection String Format

postgres://[user]:[password]@[db_hostname]/[dbname]

  • Dump from one DB to another
# Export
pg_dump -O -Fc -v -d <source_database_connection_string> -f <dump_file_name>
 
# Import
pg_restore -v -d <destination_database_connection_string> <dump_file_name>
  • Export data out in sql format
pg_dump -O -v -d <source_database_connection_string> > export.sql
  • For more information, refer to this guide

Neon DB


Neon_DB CLi Setup

brew install neonctl
neonctl auth
neonctl projects list

Data migration to NeonDB

Refer to Postgres Migration, more details see Data Migration to Neon.