Обсуждение: pg_restore

Поиск
Список
Период
Сортировка

pg_restore

От
Marco Rossi
Дата:
Hi,

I'm trying to import a db from one server to my local machine.
I have a mismatch betweek server pg_dump (8.0.3) and my machine pg_restore vesion (7.4.7).

Reading the docs I found that -i option should be used to ignore conflicts betweek dump version and db server .

So i issued a
pg_restore -i -C -d 20 -Fc -v < 20.sql
where 20.sql is the dump generated on the server with
pg_dump -Fc -C -d f /tmp/20.sql db-gw-20
and 20 (-d parameter) is a new db created as createdb 20 on the cmd line.

I receive a "pg_restore: [archiver] unsupported version in file header" error message.

Does anybody know if there is a work around for this ?


Thanks,
Marco



Relax. Yahoo! Mail virus scanning helps detect nasty viruses!

Re: pg_restore

От
Tom Lane
Дата:
Marco Rossi <swmrrossi@yahoo.com> writes:
> I'm trying to import a db from one server to my local machine.
> I have a mismatch betweek server pg_dump (8.0.3) and my machine pg_restore vesion (7.4.7).

In general you're going to have lots of problems trying to back-port a
dump file to an earlier major release --- there are almost always things
in the dump file that the older server won't take.  So even if you got
past the pg_restore error check you'd still be facing issues.

Is there a good reason you aren't running a more modern Postgres
release?

            regards, tom lane

Re: pg_restore

От
Marco Rossi
Дата:


Tom Lane <tgl@sss.pgh.pa.us> wrote:
Is there a good reason you aren't running a more modern Postgres
release?

Postgres has not been upgrade in debian sarge (stable) release ... but if they ain't no other workaroud I'll consider a system upgrade.



Relax. Yahoo! Mail virus scanning helps detect nasty viruses!

Re: pg_restore

От
Marco Rossi
Дата:


Tom Lane <tgl@sss.pgh.pa.us> wrote:
Is there a good reason you aren't running a more modern Postgres
release?

Postgres has not been upgrade in debian sarge (stable) release ... but if they ain't no other workaroud I'll consider a system upgrade.


Brings words and photos together (easily) with
PhotoMail - it's free and works with Yahoo! Mail.

[OT] PostGres Upgrade for Debian Sarge [Was: Re: pg_restore]

От
David
Дата:
On Fri, Mar 03, 2006 at 05:19:49AM -0800, Marco Rossi wrote:

> Tom Lane <tgl@sss.pgh.pa.us> wrote:

>> Is there a good reason you aren't running a more modern Postgres
>> release?

> Postgres has not been upgrade in debian sarge (stable) release ... but
> if they ain't no other workaroud I'll consider a system upgrade.

Marco (and anyone else who might be interested):

If you'd like to upgrade Postgres and still remain with Sarge, Martin
Pitt, the actual Postgres maintainer, keeps up-to-date Postgres
backports for Debian Sarge at
    http://people.debian.org/~mpitt/packages/sarge-backports

The sources.list line that I use is:

deb http://people.debian.org/~mpitt/packages/sarge-backports/   /

The current version there is 8.1.3, plus I think he also keeps updated
7.X versions, too.

I've been using his 8.1 branch for a few months for my personal database
and it seems quite stable.  When I upgraded from 7.4.7 to 8.0 (I began
with 8.0), of course I made dumps of my database, but it upgraded the DB
without a hitch.