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

pg_restore is not recognizing dump

P: 2
Hi, I am trying to restore a dump from an earlier version of Postgre but it does not recognise the dump. The OK button in pgAdmin stays greyed out after choosing dump.
Please help!
Jul 17 '07 #1
Share this Question
Share on Google+
3 Replies


Expert 100+
P: 534
I would try to to restore this dump manually.
Depending on the format chosen to create this backup you should be able to either load it from the psql prompt, or using pg_restore.
Read about pg_dump and pg_restore
(which by the way has the --ignore-version switch), then check on the format of your data-dump.

If you have any questions we'll help you here.
Jul 19 '07 #2

P: 2
The database dump is a flat text file. I created an empty database in pgAdmin 3. Then I opened psql command and then I see the postgres=# command, then I type in databasename < filename and then press enter and nothing happens. So I don't know what I am doing wrong.
Jul 19 '07 #3

Expert 100+
P: 534
You are supposed to "source in" the dump, so the command would be
\i <pathname>

Also keep in mind that depending on the options used to create the dump it may start with trying to create the database, meaning you need to drop it before you source the dump file.

Take a look at the first 20 lines of the dump file to see if any prep work is needed before you load the backup.
Jul 19 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.