Reputation: 336
I have one project in Google Clould with a Postgres database, someone can help me export this data to my pc?
Upvotes: 3
Views: 2943
Reputation: 4612
From the terminal, I had to specify the database IP address, user and password
pg_dump -h [IP-ADDRESS] -U [DB-USER] [DB-NAME] > dump.sql
Upvotes: 2
Reputation: 3763
Well you can ssh to your Google Cloud instance and run the command: pg_dump db_name > db_name.sql. The pg_dump command exports the given database to sql format. You can then download the database to your local computer.
See this link: https://www.postgresql.org/docs/9.4/static/app-pgdump.html
Upvotes: 0