Re: PG dump and restore

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Dennis C <dcswest(at)gmail(dot)com>
Cc: questions(at)postgresql(dot)org
Subject: Re: PG dump and restore
Date: 2010-06-25 15:56:46
Message-ID: 1277481406.11389.1.camel@jd-desktop.unknown.charter.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rob Wultsch 2010-06-25 16:00:30 Re: Need Some Recent Information on the Differences between Postgres and MySql
Previous Message Scott Marlowe 2010-06-25 15:56:08 Re: Need Some Recent Information on the Differences between Postgres and MySql