Accessing an old database from a new OS installation.

Started by Matthew Hendersonabout 20 years ago5 messagesgeneral
Jump to latest
#1Matthew Henderson
M.J.Henderson@swansea.ac.uk

Dear all,

I am a novice user, so any help with the following problem
would be greatly appreciated.

I had Suse 9.1 installed on one hard disk in my machine
(/dev/hda). On this machine Postgresql 7.4 was installed
and I had one database which, I believe, was installed
in the default location

This hard disk no longer boots and so I have
installed Suse 10.0 on another hard disk in the same
machine (/dev/hdb). This OS has Postgresql 8.1 installed
and I would like to be able to connect to the database on
the old hard disk (/dev/hda) so that I can dump it to
make a backup and eventually transfer it to the new hard disk.

How should I go about doing this? Are there any problems
I should be aware of in moving from version 7.4 to 8.1?

thanks,
Matthew Henderson

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Matthew Henderson (#1)
Re: Accessing an old database from a new OS installation.

Am Freitag, 27. Januar 2006 11:30 schrieb Matthew Henderson:

How should I go about doing this? Are there any problems
I should be aware of in moving from version 7.4 to 8.1?

For one thing you won't be able to read the 7.4 database using 8.1 binaries,
so you need to get 7.4 installed first in order to make a dump. If there are
no packages available you will have to compile it by hand.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#3Matthew Henderson
M.J.Henderson@swansea.ac.uk
In reply to: Peter Eisentraut (#2)
Re: Accessing an old database from a new OS installation.

Okay, so if I have 7.4 installed and I have the old
harddisk mount under /mnt/hda can I do something
like

pg_dump /mnt/hda/path_to_old_database > dump.txt

???

Show quoted text

On Fri, Jan 27, 2006 at 02:47:21PM +0100, Peter Eisentraut wrote:

Am Freitag, 27. Januar 2006 11:30 schrieb Matthew Henderson:

How should I go about doing this? Are there any problems
I should be aware of in moving from version 7.4 to 8.1?

For one thing you won't be able to read the 7.4 database using 8.1 binaries,
so you need to get 7.4 installed first in order to make a dump. If there are
no packages available you will have to compile it by hand.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#4A. Kretschmer
andreas.kretschmer@schollglas.com
In reply to: Matthew Henderson (#3)
Re: Accessing an old database from a new OS installation.

am 27.01.2006, um 14:21:31 +0000 mailte Matthew Henderson folgendes:

Okay, so if I have 7.4 installed and I have the old
harddisk mount under /mnt/hda can I do something
like

pg_dump /mnt/hda/path_to_old_database > dump.txt

No, this is imposible IMHO. You need a PG-Server with this version
(7.4), to read the data. pg_dump is only a client for the DB, it can't
read the files.

HTH, Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47215, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===

#5Doug McNaught
doug@mcnaught.org
In reply to: A. Kretschmer (#4)
Re: Accessing an old database from a new OS installation.

"A. Kretschmer" <andreas.kretschmer@schollglas.com> writes:

am 27.01.2006, um 14:21:31 +0000 mailte Matthew Henderson folgendes:

Okay, so if I have 7.4 installed and I have the old
harddisk mount under /mnt/hda can I do something
like

pg_dump /mnt/hda/path_to_old_database > dump.txt

No, this is imposible IMHO. You need a PG-Server with this version
(7.4), to read the data. pg_dump is only a client for the DB, it can't
read the files.

In addition, it's considered best practice to run (in this case) the
7.4 server against the old database, and use the 8.X pg_dump to dump
it out for loading into the 8.X server.

-Doug