Skip site navigation (1) Skip section navigation (2)

Re: PG dump and restore

From: Thom Brown <thombrown(at)gmail(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:37:29
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
On 25 June 2010 16:28, Dennis C <dcswest(at)gmail(dot)com> 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
> So in trying: /opt/local/lib/postgresql84/bin/psql Trading-Access <
> ./Trading-Access
> it causes the error: invalid byte sequence for encoding "UTF8": 0x8b
> Thanks,

If the output file is in custom format, that last step shouldn't work
since custom format isn't parsable by psql.  That would only work if
it was dumped in plain format.

Your original dump specifies a compression level, but you didn't
specify "-F c" for custom format, which would use the compression

Is your file human readable?  Try running "file Trading-Access" on the
file.  What does it say?


In response to


pgsql-general by date

Next:From: Rob WultschDate: 2010-06-25 15:48:11
Subject: Re: Need Some Recent Information on the Differences between Postgres and MySql
Previous:From: Dennis CDate: 2010-06-25 15:28:24
Subject: PG dump and restore

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group