Re: PG dump and restore - Mailing list pgsql-general

From Joshua D. Drake
Subject Re: PG dump and restore
Date
Msg-id 1277481406.11389.1.camel@jd-desktop.unknown.charter.com
Whole thread Raw
In response to PG dump and restore  (Dennis C <dcswest@gmail.com>)
List 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 by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Need Some Recent Information on the Differences between Postgres and MySql
Next
From: Rob Wultsch
Date:
Subject: Re: Need Some Recent Information on the Differences between Postgres and MySql