Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 23rd, 2005, 02:25 AM
Alexander Cohen
Guest
 
Posts: n/a
Default problem with pg_restore

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 majordomo@postgresql.org)

  #2  
Old November 23rd, 2005, 02:25 AM
Tom Lane
Guest
 
Posts: n/a
Default Re: problem with pg_restore

Alexander Cohen <alex@toomuchspace.com> writes:[color=blue]
> pg_restore -d <dbname> -C -v -U <user> <src tar file>[/color]
[color=blue]
> 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?[/color]

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 majordomo@postgresql.org)

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles