From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Garo Hussenjian <garo(at)xapnet(dot)com> |
Cc: | Postgresql General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Dump / restore question |
Date: | 2002-12-31 06:44:05 |
Message-ID: | 28092.1041317045@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Garo Hussenjian <garo(at)xapnet(dot)com> writes:
> I tried "pg_restore --rearrange dump_file" but I get the error:
> pg_restore: [archiver] input file does not appear to be a valid archive
> Is this because I did not dump with the -F (format) option?
If you used no -F option, pg_dump defaults to a plain SQL-script dump,
which you must needs feed to psql to restore. pg_restore only works
with -Ft or -Fc output of pg_dump.
If you don't want to restore indexes, my advice would be to run pg_dump
twice with -s (schema only) and -a (data only) options. Then manually
edit the -s output to remove index definitions, along with anything else
you don't need. Then restore both parts via psql. This is low-tech but
gives you pretty complete control over what happens.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Garo Hussenjian | 2002-12-31 06:48:51 | Re: Dump / restore question |
Previous Message | Garo Hussenjian | 2002-12-31 05:44:34 | Dump / restore question |