Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dump and restore

Status
Not open for further replies.

eheidrich

Programmer
Joined
Feb 2, 2005
Messages
7
Location
BR
I dumped the database from the server and I am trying to set it up on another server by using psql command. Just like this:

psql newdb > c:\dumpfile.dump

The psql command is working. But whenever I do that the prompt stops answering instead of reading the file and generating the data.

Any tips? I have the database created already.

Thanks!
 
psql newdb > c:\dumpfile.dump

should be

psql newdb < c:\dumpfile.dump
or even better

psql newdb -f c:\dumpfile.dump


also if you use Large Objects it that database - this will no work you should do something like

pg_dump -Ft -b olddb > dumpfile.tar

and then

pg_restore -d newdb dumpfile.tar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top