pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedpg_dumpall and pg_restore issues
3+ messages / 2 participants
[nested] [flat]
* pg_dumpall and pg_restore issues
@ 2002-08-14 01:07 Darren McClelland <darren@zonarsystems.com>
2002-08-14 01:21 ` Re: pg_dumpall and pg_restore issues Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: Darren McClelland @ 2002-08-14 01:07 UTC (permalink / raw)
To: pgsql-admin
Hi,
I'm having problems using pg_dumpall and pg_restore together.
Basically I can't get pg_restore to recognise the dump as a valid archive.
Example:
Create a dump like this pg_dumpall -U postgres -Fc -Z 9 > /tmp/dump
Then try to restore it
$
pg_restore -U postgres -Fc /tmp/dump
pg_restore: [archiver] did not find magic string in file header
or
$pg_restore -U postgres /tmp/dump
pg_restore: [archiver] input file does not appear to be a valid archive
The dump file is strange too, it starts out as a standard SQL dump like
pg_dump produces, then shifts to binary, Iassume thats the compressed data.
The same pattern contnues throughout the file, straight SQL text then big
chunks of binary data.
Version:
$pg_dumpall --version
pg_dumpall (PostgreSQL) 7.2.1
Does anyone have any ideas?
Thanks,
Darren McClelland
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pg_dumpall and pg_restore issues
2002-08-14 01:07 pg_dumpall and pg_restore issues Darren McClelland <darren@zonarsystems.com>
@ 2002-08-14 01:21 ` Bruce Momjian <pgman@candle.pha.pa.us>
2002-08-14 01:43 ` Re: pg_dumpall and pg_restore issues Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 1 reply; 3+ messages in thread
From: Bruce Momjian @ 2002-08-14 01:21 UTC (permalink / raw)
To: darren@zonarsystems.com; +Cc: pgsql-admin
Yes, pg_dumpall doesn't recognize the -F flags. It only dumps as text
format.
The manual page says:
Any other command line parameters are passed to the underlying
<xref linkend="app-pgdump">
calls. This is useful to control some aspects of the output
format, but some options such as <option>-f</option>,
<option>-t</option>, and <replaceable
class="parameter">dbname</replaceable> should be avoided.
We should throw an error if -f or -F is passed to pg_dumpall. I will
add some code to try and catch that for 7.3.
---------------------------------------------------------------------------
Darren McClelland wrote:
> Hi,
>
> I'm having problems using pg_dumpall and pg_restore together.
> Basically I can't get pg_restore to recognise the dump as a valid archive.
>
> Example:
> Create a dump like this pg_dumpall -U postgres -Fc -Z 9 > /tmp/dump
> Then try to restore it
> $
> pg_restore -U postgres -Fc /tmp/dump
> pg_restore: [archiver] did not find magic string in file header
>
> or
>
> $pg_restore -U postgres /tmp/dump
> pg_restore: [archiver] input file does not appear to be a valid archive
>
> The dump file is strange too, it starts out as a standard SQL dump like
> pg_dump produces, then shifts to binary, Iassume thats the compressed data.
> The same pattern contnues throughout the file, straight SQL text then big
> chunks of binary data.
>
> Version:
> $pg_dumpall --version
> pg_dumpall (PostgreSQL) 7.2.1
>
> Does anyone have any ideas?
> Thanks,
> Darren McClelland
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pg_dumpall and pg_restore issues
2002-08-14 01:07 pg_dumpall and pg_restore issues Darren McClelland <darren@zonarsystems.com>
2002-08-14 01:21 ` Re: pg_dumpall and pg_restore issues Bruce Momjian <pgman@candle.pha.pa.us>
@ 2002-08-14 01:43 ` Bruce Momjian <pgman@candle.pha.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: Bruce Momjian @ 2002-08-14 01:43 UTC (permalink / raw)
To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: darren@zonarsystems.com; pgsql-admin
I did some research and I see this in the pg_dumpall that will be
distributed in 7.3:
-F*|--format=*|-f|--file=*|-t|--table=*)
echo "pg_dump can not process option $1, exiting" 1>&2
exit 1
;;
Seems I actually did the work:
revision 1.17
date: 2002/04/11 04:56:21; author: momjian; state: Exp; lines: +14 -11
Fix problem with invalid database name assignment in while loop.
Properly warn of invalid pg_dumpall options; minor quoting cleanups.
Anyway, it will properly warn you in 7.3.
---------------------------------------------------------------------------
Bruce Momjian wrote:
>
> Yes, pg_dumpall doesn't recognize the -F flags. It only dumps as text
> format.
>
> The manual page says:
>
> Any other command line parameters are passed to the underlying
> <xref linkend="app-pgdump">
> calls. This is useful to control some aspects of the output
> format, but some options such as <option>-f</option>,
> <option>-t</option>, and <replaceable
> class="parameter">dbname</replaceable> should be avoided.
>
> We should throw an error if -f or -F is passed to pg_dumpall. I will
> add some code to try and catch that for 7.3.
>
> ---------------------------------------------------------------------------
>
> Darren McClelland wrote:
> > Hi,
> >
> > I'm having problems using pg_dumpall and pg_restore together.
> > Basically I can't get pg_restore to recognise the dump as a valid archive.
> >
> > Example:
> > Create a dump like this pg_dumpall -U postgres -Fc -Z 9 > /tmp/dump
> > Then try to restore it
> > $
> > pg_restore -U postgres -Fc /tmp/dump
> > pg_restore: [archiver] did not find magic string in file header
> >
> > or
> >
> > $pg_restore -U postgres /tmp/dump
> > pg_restore: [archiver] input file does not appear to be a valid archive
> >
> > The dump file is strange too, it starts out as a standard SQL dump like
> > pg_dump produces, then shifts to binary, Iassume thats the compressed data.
> > The same pattern contnues throughout the file, straight SQL text then big
> > chunks of binary data.
> >
> > Version:
> > $pg_dumpall --version
> > pg_dumpall (PostgreSQL) 7.2.1
> >
> > Does anyone have any ideas?
> > Thanks,
> > Darren McClelland
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> >
>
> --
> Bruce Momjian | http://candle.pha.pa.us
> pgman@candle.pha.pa.us | (610) 359-1001
> + If your life is a hard drive, | 13 Roberts Road
> + Christ can be your backup. | Newtown Square, Pennsylvania 19073
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2002-08-14 01:43 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-08-14 01:07 pg_dumpall and pg_restore issues Darren McClelland <darren@zonarsystems.com>
2002-08-14 01:21 ` Bruce Momjian <pgman@candle.pha.pa.us>
2002-08-14 01:43 ` Bruce Momjian <pgman@candle.pha.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