By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,660 Members | 1,230 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,660 IT Pros & Developers. It's quick & easy.

problem with pg_restore

P: n/a
I cant seem to get pg_restore to work for me.

here's how im calling it:

pg_restore -d <dbname> -C -v -U <user> <src tar file>

It keeps on telling me that the database <dbname> does not exist so it
cant connect to it. I thought the -C flag creates the database, what am
i missing here?

Thanks

Alex
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Alexander Cohen <al**@toomuchspace.com> writes:
pg_restore -d <dbname> -C -v -U <user> <src tar file> It keeps on telling me that the database <dbname> does not exist so it
cant connect to it. I thought the -C flag creates the database, what am
i missing here?


It does, but you have to connect somewhere first so you can issue the
CREATE DATABASE command. I think the common approach is to use "-d template1"
in combination with -C.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.