Обсуждение: Salvage older PostgreSQL data disk - help?

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

Salvage older PostgreSQL data disk - help?

От
Conrad
Дата:
Greetings,

In short:

Using a new FreeBSD (4.9) PostgreSQL (7.3) server, can I
rescue PostgreSQL data from a hard drive pulled from an
older (motherboard just died) FreeBSD (4.??) PostgreSQL (7.??)
server? If so, how?

The long version:

Helping a friend who had a FreeBSD PostgreSQL server crash recently.
This was a motherboard failure, and the data on the drives looks
usable, but we are rebuilding the server, using a newer PostgreSQL
(7.3) - his most recent PostgreSQL dump was a few weeks ago,
(hey, at least he was backing it up - sort of). The version of
PostgreSQL used to build his data is unknown - whatever was current
around August of 2002 (7.1 maybe?). (Once the server is built and
the old drive mounted, I may be able to figure out the exact version
from the FreeBSD package DB, which should also be on that drive.)

Normally, I would tell him to just run with the dump from a couple
of weeks ago and live with it, but there has been a lot of non-
duplicable work done since then by an individual who left his
organization 2 days ago (and apparently cursed his server when
she left ;-) )

It would be real nice if we could use one of the old server drives
to restore his PostgreSQL DB - without having to build an old
PostgreSQL server just to extract the data, then rebuild on a 7.3
server.

Is this feasible? Pits or tipfalls, anyone?

Cheers and many thanks,

Conrad



Re: Salvage older PostgreSQL data disk - help?

От
Andrew Sullivan
Дата:
On Fri, Dec 19, 2003 at 12:43:24AM +0000, Conrad wrote:
>
> It would be real nice if we could use one of the old server drives
> to restore his PostgreSQL DB - without having to build an old
> PostgreSQL server just to extract the data, then rebuild on a 7.3
> server.
>
> Is this feasible? Pits or tipfalls, anyone?

No.  You need the old server.

A

--
----
Andrew Sullivan                         204-4141 Yonge Street
Afilias Canada                        Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110


Re: Salvage older PostgreSQL data disk - help?

От
Tom Lane
Дата:
Conrad <bogus_address@nospam.com> writes:
> Helping a friend who had a FreeBSD PostgreSQL server crash recently.
> This was a motherboard failure, and the data on the drives looks
> usable, but we are rebuilding the server, using a newer PostgreSQL
> (7.3) - his most recent PostgreSQL dump was a few weeks ago,
> (hey, at least he was backing it up - sort of). The version of
> PostgreSQL used to build his data is unknown - whatever was current
> around August of 2002 (7.1 maybe?). (Once the server is built and
> the old drive mounted, I may be able to figure out the exact version
> from the FreeBSD package DB, which should also be on that drive.)

The PG_VERSION files in the data directory will give you the major
version (e.g. 7.1), and you can use any server in that major version
series --- though of course you should always use the latest minor
release in the series ;-)

You will need to use some version in the same series; a newer major
release will *not* start up.

            regards, tom lane

Re: Salvage older PostgreSQL data disk - help?

От
Jonathan Bartlett
Дата:
I think you're going to have to build an old PG.  But really, how long
does that take, an hour maybe on a slow machine?  Just install it to a
non-standard directory and you'll be fine.

In fact, on second thought, you should find out what version of PG he was
using, and stick to that.  You really shouldn't upgrade PG versions
(especially major versions, but minor versions as well) without running
your own tests.

Jon

On Fri, 19 Dec 2003, Conrad wrote:

>
> Greetings,
>
> In short:
>
> Using a new FreeBSD (4.9) PostgreSQL (7.3) server, can I
> rescue PostgreSQL data from a hard drive pulled from an
> older (motherboard just died) FreeBSD (4.??) PostgreSQL (7.??)
> server? If so, how?
>
> The long version:
>
> Helping a friend who had a FreeBSD PostgreSQL server crash recently.
> This was a motherboard failure, and the data on the drives looks
> usable, but we are rebuilding the server, using a newer PostgreSQL
> (7.3) - his most recent PostgreSQL dump was a few weeks ago,
> (hey, at least he was backing it up - sort of). The version of
> PostgreSQL used to build his data is unknown - whatever was current
> around August of 2002 (7.1 maybe?). (Once the server is built and
> the old drive mounted, I may be able to figure out the exact version
> from the FreeBSD package DB, which should also be on that drive.)
>
> Normally, I would tell him to just run with the dump from a couple
> of weeks ago and live with it, but there has been a lot of non-
> duplicable work done since then by an individual who left his
> organization 2 days ago (and apparently cursed his server when
> she left ;-) )
>
> It would be real nice if we could use one of the old server drives
> to restore his PostgreSQL DB - without having to build an old
> PostgreSQL server just to extract the data, then rebuild on a 7.3
> server.
>
> Is this feasible? Pits or tipfalls, anyone?
>
> Cheers and many thanks,
>
> Conrad
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>


Re: Salvage older PostgreSQL data disk - help?

От
"scott.marlowe"
Дата:
On Fri, 19 Dec 2003, Jonathan Bartlett wrote:

> I think you're going to have to build an old PG.  But really, how long
> does that take, an hour maybe on a slow machine?  Just install it to a
> non-standard directory and you'll be fine.

FYI, on the slowest computer I own, pgsql 7.2 took 30 minutes to run
./configure and 2.5 hours to run make / make install.  that machine is a
486DX250 laptop (Toshiba 4700) with 16 Megs of RAM.  A 50 MHz Sparc 20
with SCSI drives took about half that time.


Re: Salvage older PostgreSQL data disk - help?

От
Christopher Browne
Дата:
The world rejoiced as Conrad <bogus_address@nospam.com> wrote:
> On Fri, 19 Dec 2003 00:43:24 +0000, Conrad wrote:
>
>>
>> Greetings,
>>
>> In short:
>>
>> Using a new FreeBSD (4.9) PostgreSQL (7.3) server, can I
>> rescue PostgreSQL data from a hard drive pulled from an
>> older (motherboard just died) FreeBSD (4.??) PostgreSQL (7.??)
>> server? If so, how?
>>
>> The long version:
> [drop table rest_of_message]
>
> Many thanks, all - 7.2.1 (the version that was on the old
> machine building as we speak. Do I need to do the full
> initbd, or can I just slide the old data/ tree in place?

The first thing to try certainly is to "slide the old data tree into
place."  I'd suggest keeping a scratch copy, of course...

It ought to "just work."  Indeed, it ought to "just work" if you put
7.2.4 software in place.
--
output = ("cbbrowne" "@" "ntlug.org")
http://cbbrowne.com/info/multiplexor.html
But  what can  you  do with  it?   -- ubiquitous  cry from  Linux-user
partner.  -- Andy Pearce, <ajp@hpopd.pwd.hp.com>

Re: Salvage older PostgreSQL data disk - help?

От
Conrad
Дата:
On Fri, 19 Dec 2003 00:43:24 +0000, Conrad wrote:

>
> Greetings,
>
> In short:
>
> Using a new FreeBSD (4.9) PostgreSQL (7.3) server, can I
> rescue PostgreSQL data from a hard drive pulled from an
> older (motherboard just died) FreeBSD (4.??) PostgreSQL (7.??)
> server? If so, how?
>
> The long version:
[drop table rest_of_message]

Many thanks, all - 7.2.1 (the version that was on the old
machine building as we speak. Do I need to do the full
initbd, or can I just slide the old data/ tree in place?

Thanks,

Conrad