Re: Dump / restore question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Dump / restore question
Дата
Msg-id 28092.1041317045@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Dump / restore question  (Garo Hussenjian <garo@xapnet.com>)
Ответы Re: Dump / restore question  (Garo Hussenjian <garo@xapnet.com>)
Список pgsql-general
Garo Hussenjian <garo@xapnet.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

В списке pgsql-general по дате отправления:

Предыдущее
От: Garo Hussenjian
Дата:
Сообщение: Dump / restore question
Следующее
От: Garo Hussenjian
Дата:
Сообщение: Re: Dump / restore question