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

restore problem

P: 4
I am trying to restore a postgre dump from a linux server to windows system bu t am not able to do it from pg_restore or pgadmin.

in pgadmin it is saying not a valid archive and if we use pg_restore in command line then it is giving the following error
“pg_restore: [archiver] could not open input file: No such file or directory”

is there a procedure to get the dump from the *nix to windows
Mar 31 '07 #1
Share this Question
Share on Google+
5 Replies

Expert 100+
P: 534
Welcome to the forum!

Provided that you have a compatible db version you should be able to load a Unix data-dump into your Windows installation.

There is a number of ways in which data dump can be created, and few formats which can be specified for the data file.

First thing you need to know is how this dump was generated, and how it was copied from Unix to Windows.
(One common problem is using incorrect mode - ascii versus binary - while FTP'ing a file between two different platforms)

You may also find helpful reviewing these docs:
Backup and Restore
Mar 31 '07 #2

P: 4
the dump is from PostgreSQL 7.4.5 and i am using 8.1.

Can we restore the dump from one version to another
Apr 2 '07 #3

Expert 100+
P: 534
Generally you should be able to import this data.
You may run into problems with some triggers or functions, but I think they can be addressed on one by one basis.

You really need to look into other questions I asked in my previous posting.
How the dump file was created?
(pg_dump, pg_dumpall)

What is the format of this file?
(text, binary, tgz)

Knowing the name of the file (most importantly the extension) may provide a hint.

In some cases all you need to do in order to import a datafile is
psql -f file-name, but it would be hard to help you without getting this info first.
Apr 2 '07 #4

P: 4
hi michael,

Tx for the speedy and needy response.
the problem is solved.

The dump was created using
Expand|Select|Wrap|Line Numbers
  1. pg_dump -D 
so when we tried the normal pg_restore it was telling us it is not a valid archive.

I restored it with the following
Expand|Select|Wrap|Line Numbers
  1. psql pg_resore -d <database> < dump
once again tx for your co operation
Apr 4 '07 #5

Expert 100+
P: 534
You're welcome!
Apr 5 '07 #6

Post your reply

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