Restore from 7.3 to 7.2

Started by Chris M. Gambleabout 23 years ago3 messagesgeneral
Jump to latest
#1Chris M. Gamble
chris.gamble@cpbinc.com

I have a 7.3 postgres database that I need to create a backup from, and
restore onto a 7.2 database. Is this possible and if so where can I find
references on doing so?

Thanks,

Chris Gamble
CPB Inc
p: 972-579-1642 x 22
f: 972-579-1355

#2Emmanuel Charpentier
charpent@bacbuc.dyndns.org
In reply to: Chris M. Gamble (#1)
Re: Restore from 7.3 to 7.2

chris.gamble@CPBINC.com wrote:

I have a 7.3 postgres database that I need to create a backup from, and
restore onto a 7.2 database. Is this possible and if so where can I find
references on doing so?

I stumbled on this one recently. The only way I found was to do a *text*
dump (pg_dump -F p) and edit the dump : you have to delete all references
to schemas and all references to column names in the "copy" commands
restoring data.

Not a pretty sight ... :-((.

Hope this helps,

Emmanuel Charpentier

#3frag
frag29@NOSPAM.o2.pl
In reply to: Emmanuel Charpentier (#2)
Re: Restore from 7.3 to 7.2

Emmanuel Charpentier wrote:

chris.gamble@CPBINC.com wrote:

I have a 7.3 postgres database that I need to create a backup from, and
restore onto a 7.2 database. Is this possible and if so where can I find
references on doing so?

I stumbled on this one recently. The only way I found was to do a *text*
dump (pg_dump -F p) and edit the dump : you have to delete all
references to schemas and all references to column names in the "copy"
commands restoring data.

Also remove all references to pg_catalog from the SELECTs initiating
sequence numbers with setval(...).

And if you have to move large objects as well, it should be possible to
dump to tar format, untar it manually, find and modify the sql file,
prepare a new tar out of them and restore the archive. I haven't tested
it in this scenario actually but it might work.

HTH

Przemek Tomala