Обсуждение: DB Migration 8.4 -> 8.3
I unintentionally installed 8.4beta2 on a server (using yum), while I
run 8.3.7 on my dev machine.
The 8.3 version of pg_dump does not work with the server, even with
the -i option:
8.3: pg_dump: Error message from server: ERROR: column
"reltriggers" does not exist
the 8.4 pg_dump works okay, but then the 8.3 version of pg_restore is
not able to restore the resultant databases:
8.3: pg_restore: [archiver] input file does not appear to be a
valid archive
How can I migrate a database from 8.4 to 8.3?
I can't see any versioning options in pg_dump:
http://www.postgresql.org/docs/8.4/static/app-pgdump.html
Thanks!
--- On Mon, 15/6/09, Eoghan Murray <eoghanomurray@gmail.com> wrote: > From: Eoghan Murray <eoghanomurray@gmail.com> > Subject: [GENERAL] DB Migration 8.4 -> 8.3 > To: pgsql-general@postgresql.org > Date: Monday, 15 June, 2009, 10:19 PM > I unintentionally installed 8.4beta2 > on a server (using yum), while I > run 8.3.7 on my dev machine. > The 8.3 version of pg_dump does not work with the server, > even with > the -i option: > 8.3: pg_dump: Error message from server: > ERROR: column > "reltriggers" does not exist > the 8.4 pg_dump works okay, but then the 8.3 version of > pg_restore is > not able to restore the resultant databases: > 8.3: pg_restore: [archiver] input file > does not appear to be a > valid archive > Try the 8.4 pg_restore against the 8.3 server
Eoghan Murray <eoghanomurray@gmail.com> writes:
> How can I migrate a database from 8.4 to 8.3?
The only way is to dump to text (no -Fc or -Ft) with 8.4's pg_dump,
and then manually edit the file until 8.3 will take it.
> 8.3: pg_restore: [archiver] input file does not appear to be a
> valid archive
It's possible here that your only mistake was using -Fc. That format
isn't necessarily backwards-compatible.
regards, tom lane
2009/6/15 Glyn Astill <gl*******@yahoo.co.uk>:
> Try the 8.4 pg_restore against the 8.3 server
>
Thanks!, that worked!
FWIW I set up an ssh connection with the reverse/remote forwarding
option -R
Also the error message on pg_restore should have read:
8.3: pg_restore: [archiver] unsupported version (1.11) in file
header