Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore - Mailing list pgsql-general

From Andrus Moor
Subject Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore
Date
Msg-id A64CA600C6FD4792AB441494A8C354C0@andrusnotebook
Whole thread Raw
In response to Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore  (Adrian Klaver <adrian.klaver@gmail.com>)
Responses Re: How to restore from backup to 8.4.3 server using 9.0 dump/restore
List pgsql-general
Adrian,

thank you.

> I am not sure I follow. Are you taking a pg_dump of a 9.0 database using a
> 9.0
> version of pg_dump and trying to restore to a 8.4.3 database or are using
> the
> 9.0 pg_dump against the 8.4.3 server and then restoring back to it? In
> either
> case the problem you see above will probably be only the first.

I used only 9.0 dump and restore. I did the following:

1. Created backup copy from 8.4.3 using  9.0 pg_dump
2. Restored from this backup to 8.4.3 using 9.0 pg_restore

9.0 pg_restore fails since 8.4.3 server reports invalid sql command  in
create
language plpgsql  statement. previous pg_restores worked OK.
Is this 9.0 pg_restore bug ?

> Going backwards
> using pg_dump/pg_restore is not guaranteed to work. Your best hope if you
> must
> do that is to do the dump in plain text format and change the problems
> manually
> as you proceed.

Application executes  9.0 pg_dump/pg_restore
Application can connect to different servers starting and 8.1 and need to
able for backup/restore for every this server.
For single backup copy, dump and restore are executed for same server
version,

e.q backup created from site A using Postgres version x  will used to
restore
only to this site for same postgres version x
Backup created from site B using Postgres version y will used to restore
only to
this site to same Postgres version y

How to support backup restore for all >=8.1 servers using single
pg_dump/pg_restore ?

Currently I looks like for 8.4 serves 9.0 backup/restore cannot used.

Andrus.


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: create language 'plpythonu' on win failed
Next
From: Yan Cheng CHEOK
Date:
Subject: Fast Insert and Update (through COPY)