pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedUnable to user pg_restore
2+ messages / 2 participants
[nested] [flat]
* Unable to user pg_restore
@ 2003-10-20 13:01 Kumar <sgnerd@yahoo.com.sg>
2003-10-20 16:49 ` Re: Unable to user pg_restore Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: Kumar @ 2003-10-20 13:01 UTC (permalink / raw)
To: pgsql-sql
Dear Friends,
I have created a compressed backup for the database - sampledb using the following
$ pg_dump -h 192.128.2.51 -v -u -f /home/db_repository/sampledb20031020.sql.tar.gz wats -F c
while I try to restore this with the pg_restore function as follows
$ pg_restore -d sampledbtest -f /home/db_repositorysampledb.sql.tar.gz -F c -v -c -O -h 192.128.2.51 -p 5432 -u
User name: postgres
It never prompt for password, so I just typed the password , and get the error as follows,
postgres
pg_restore: [archiver] did not find magic string in file header
$
Anyone could advise me on this pls.
Kumar
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Unable to user pg_restore
2003-10-20 13:01 Unable to user pg_restore Kumar <sgnerd@yahoo.com.sg>
@ 2003-10-20 16:49 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2003-10-20 16:49 UTC (permalink / raw)
To: Kumar <sgnerd@yahoo.com.sg>; +Cc: pgsql-sql
"Kumar" <sgnerd@yahoo.com.sg> writes:
> $ pg_restore -d sampledbtest -f /home/db_repositorysampledb.sql.tar.gz -F c=
> -v -c -O -h 192.128.2.51 -p 5432 -u
> User name: postgres
This is the wrong way to invoke pg_restore. "-f file" is an *output*
file name. -d and -f are mutually contradictory options ... not sure
why the thing doesn't complain about that. What you want is just
pg_restore -d sampledbtest -v -c -O -h 192.128.2.51 -p 5432 -u inputfilename
Depending on whether -d or -f takes precedence, the program might have
tried to overwrite your dump file; better check.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-10-20 16:49 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-10-20 13:01 Unable to user pg_restore Kumar <sgnerd@yahoo.com.sg>
2003-10-20 16:49 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox