Re: PG dump and restore

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: PG dump and restore
Дата
Msg-id 1277481406.11389.1.camel@jd-desktop.unknown.charter.com
обсуждение исходный текст
Ответ на PG dump and restore  (Dennis C <dcswest@gmail.com>)
Список pgsql-general
On Fri, 2010-06-25 at 08:28 -0700, Dennis C wrote:
> Greetings;
>
>
> As I've been doing for quite some time, backed up my database as
> such: /opt/local/lib/postgresql84/bin/pg_dump -c -f ./Trading-Access
> -Z 5 Trading-Access
>
>
> But then when I tried restoring it my usual way as
> such: /opt/local/lib/postgresql84/bin/pg_restore -d
> Trading-Access ./Trading-Access
> it causes the error: pg_restore: [archiver] input file does not appear
> to be a valid archive

You don't use pg_restore for plain text dumps which is what you are
doing above. You use psql.

>
>
> So in trying: /opt/local/lib/postgresql84/bin/psql Trading-Access
> < ./Trading-Access
> it causes the error: invalid byte sequence for encoding "UTF8": 0x8b

It means the database you has characters in it that are not UTF8
compliant. You can use iconv to clean it up.

Joshua D. Drake


>
>
> Thanks,

--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Need Some Recent Information on the Differences between Postgres and MySql
Следующее
От: Rob Wultsch
Дата:
Сообщение: Re: Need Some Recent Information on the Differences between Postgres and MySql