0

I ran:

psql "sslmode=disable dbname=postgres user=postgres hostaddr=[INSTANCE_IP]" 
  • yes I put my google cloud instant's IP here and authed just fine and got to the postgres prompt

Then I ran this:

pg_dumpall --schema-only > ~/grinds/desktop/definitiononly.sql

grinds is my OS X laptop

but I don't see the definitiononly.sql file anywhere in OS X. Was it created on the server?? I didn't think so, pretty sure it should output to my PC.

Same thing happened when I used the Google Cloud Console:

enter image description here

The operation did nothing after I hit enter so I assumed it worked but can't tell

PositiveGuy
  • 17,621
  • 26
  • 79
  • 138

1 Answers1

0

pg_dump is a program. It is run from the Linux command line (eg bash), not the SQL command line (eg psql). You would have gotten a syntax error, except psql allows multiline commands that are ended by a semicolon and a newline, not by just a newline.

jjanes
  • 37,812
  • 5
  • 27
  • 34