Import postgres .sql file to Google Cloud Sql from command line

Simply run the following command from command line of your local machine:

psql -h [ip of google cloud] -W [database password] -U [database user] -d [database name] -p [database port] -f /Users/your-username/path/to/your/dump/file.sql

And, remember to activete your IP address in the “Authorization” tab on Google Cloud

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *