pg_restore: [archiver] could not open input file

Started by Nonamealmost 20 years ago4 messagesgeneral
Jump to latest
#1Noname
lbolognini@gmail.com

Hi all,

I'm not able to restore a pg 8.1 database. The dump has been generated
with pg_dump. I tried with both absolute and relative path but it
doesnt find the file. Any clue?

C:\www\foo.com\trunk\db>pg_restore -h localhost -U postgres -W
mySecretPassword script.sql

pg_restore: [archiver] could not open input file: No such file or
directory

Thanks,
Lorenzo

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Noname (#1)
Re: pg_restore: [archiver] could not open input file

lbolognini@gmail.com writes:

C:\www\foo.com\trunk\db>pg_restore -h localhost -U postgres -W
mySecretPassword script.sql

I don't think you're supposed to put the password on the command line
like that. It's probably taking "mySecretPassword" as the file name
to read.

regards, tom lane

#3Noname
lbolognini@gmail.com
In reply to: Tom Lane (#2)
Re: pg_restore: [archiver] could not open input file

Tom Lane wrote:

lbolognini@gmail.com writes:

C:\www\foo.com\trunk\db>pg_restore -h localhost -U postgres -W
mySecretPassword script.sql

I don't think you're supposed to put the password on the command line
like that. It's probably taking "mySecretPassword" as the file name
to read.

Hi Tom,

it doesn't seem even that: I tried to exclude all other parameters and
leaving just:
c:\> pg_restore script.sql

also specifying the absolute path it's still giving an error, though
different:
pg_restore: [archiver] input file does not appear to be a valid archive

Dunno, it's just a regular db dump with function definitions and create
table instructions

Thanks anyway,
Lorenzo

#4Martijn van Oosterhout
kleptog@svana.org
In reply to: Noname (#3)
Re: pg_restore: [archiver] could not open input file

On Thu, Jun 29, 2006 at 07:18:56AM -0700, lbolognini@gmail.com wrote:

it doesn't seem even that: I tried to exclude all other parameters and
leaving just:
c:\> pg_restore script.sql

If that's just a straight SQL script produced by pg_dump, then you don't
need pg_restore, just "psql -f script.sql" will do.

Have a nice day,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/

Show quoted text

From each according to his ability. To each according to his ability to litigate.