Salvage older PostgreSQL data disk - help?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Conrad

    Salvage older PostgreSQL data disk - help?


    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


  • Andrew Sullivan

    #2
    Re: Salvage older PostgreSQL data disk - help?

    On Fri, Dec 19, 2003 at 12:43:24AM +0000, Conrad wrote:[color=blue]
    >
    > 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?[/color]

    No. You need the old server.

    A

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


    ---------------------------(end of broadcast)---------------------------
    TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddres sHere" to majordomo@postg resql.org)

    Comment

    • Tom Lane

      #3
      Re: Salvage older PostgreSQL data disk - help?

      Conrad <bogus_address@ nospam.com> writes:[color=blue]
      > 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.)[/color]

      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

      ---------------------------(end of broadcast)---------------------------
      TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

      Comment

      • Jonathan Bartlett

        #4
        Re: Salvage older PostgreSQL data disk - help?

        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:
        [color=blue]
        >
        > 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
        >[/color]


        ---------------------------(end of broadcast)---------------------------
        TIP 6: Have you searched our list archives?



        Comment

        • Conrad

          #5
          Re: Salvage older PostgreSQL data disk - help?


          On Fri, 19 Dec 2003 00:43:24 +0000, Conrad wrote:
          [color=blue]
          >
          > 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:[/color]
          [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

          Comment

          • Christopher Browne

            #6
            Re: Salvage older PostgreSQL data disk - help?

            The world rejoiced as Conrad <bogus_address@ nospam.com> wrote:[color=blue]
            > On Fri, 19 Dec 2003 00:43:24 +0000, Conrad wrote:
            >[color=green]
            >>
            >> 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:[/color]
            > [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?[/color]

            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" )

            But what can you do with it? -- ubiquitous cry from Linux-user
            partner. -- Andy Pearce, <ajp@hpopd.pwd. hp.com>

            Comment

            • scott.marlowe

              #7
              Re: Salvage older PostgreSQL data disk - help?

              On Fri, 19 Dec 2003, Jonathan Bartlett wrote:
              [color=blue]
              > 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.[/color]

              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.


              ---------------------------(end of broadcast)---------------------------
              TIP 9: the planner will ignore your desire to choose an index scan if your
              joining column's datatypes do not match

              Comment

              Working...