Re: Dump / restore question

From: Garo Hussenjian <garo(at)xapnet(dot)com>
To: Postgresql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Dump / restore question
Date: 2002-12-31 07:20:24
Message-ID: BA368538.6005%garo@xapnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks, Tom

I suppose if I made two copies of the -s dump I could alter one to create
the tables and the other to create the indexes. I can then sandwich the -a
dump between the others... Pretty low-tech indeed, but better than waiting
16 hours...

What about the -r option to pg_restore? Shouldn't this have the same effect?
It seems to be hanging indefinitely when I try to use it (see my second
posting)...

Garo.

on 12/30/02 10:44 PM, Tom Lane at tgl(at)sss(dot)pgh(dot)pa(dot)us wrote:

> 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
>

=-=-==-=-=-==

Xapnet Internet Solutions
1501 Powell St., Suite N
Emeryville, CA 94608

Tel - (510) 655-9771
Fax - (510) 655-9775
Web - http://www.xapnet.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message pginfo 2002-12-31 07:51:46 Re: pg and transactions
Previous Message Tom Lane 2002-12-31 06:49:36 Re: Postgres run out of disk space