Londerson Araújo
Londerson Araújo

Reputation: 336

How export postgresql database from Google Clould

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

Answers (2)

hcarreras
hcarreras

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

Nadir Latif
Nadir Latif

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

Related Questions