Обсуждение: Help! Upgrade to 8.4 dropped my databases

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

Help! Upgrade to 8.4 dropped my databases

От
Andrew Perrin
Дата:
Greetings all-

Running postgresql under debian, my standard apt-get upgrade upgraded me
from 8.3 to 8.4. As a result, I no longer have access to the databases
that were created under 8.3. Typically I would use pg_upgradecluster to
fix this problem; however, the upgrade also removed 8.3, and so I have no
access to these databases! Reinstalling 8.3 does not restore the
access, although it does appear that the raw files are still there.

I do have regular tape backups of the databases, but am having trouble
getting them to read. So I would love advice on one (or both) of the
following questions:

1.) Is there a way to "reconnect" the 8.3 server, after reinstalling it,
to the raw files, so that the databases are there? I will then do a
pg_upgradecluster and be happy; or, alternatively,

2.) Can someone help with the restore process from tape? The command my
script uses to write the backups to tape is:
     pg_dump -F t <databasename> | bzip2 -c | dd of=/dev/nst0 obs=512 conv=sync

Thanks for advice on either or both.

==Andy Perrin

----------------------------------------------------------------------
Andrew J Perrin - andrew_perrin (at) unc.edu - http://perrin.socsci.unc.edu
Associate Professor and Associate Chair of Sociology
University of North Carolina - CB#3210, Chapel Hill, NC 27599-3210 USA



Re: Help! Upgrade to 8.4 dropped my databases

От
Alvaro Herrera
Дата:
Andrew Perrin wrote:

> 1.) Is there a way to "reconnect" the 8.3 server, after reinstalling
> it, to the raw files, so that the databases are there? I will then
> do a pg_upgradecluster and be happy; or, alternatively,

If you're in a hurry, just install 8.3 from source and run postmaster -D
/path/to/data/files (be sure to choose a nonconflicting port).  Then you
can connect to it with pg_dump and get the data out and into the 8.4
installation.

Oh, make sure you keep an eye out for the socket directory too ...
default PG places sockets in /tmp whereas Debian places them in
/var/run/postgresql.  Just in case.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: Help! Upgrade to 8.4 dropped my databases

От
Steve Crawford
Дата:
Andrew Perrin wrote:
> Greetings all-
>
> Running postgresql under debian, my standard apt-get upgrade upgraded
> me from 8.3 to 8.4. As a result, I no longer have access to the
> databases that were created under 8.3.

Are you sure that 8.3 is really gone? Check around (look at what is in
/etc/init.d/ and /etc/postgresql/ for starters). I'm guessing you may
find both versions are available but your boot configuration is starting
the wrong one.

Cheers,
Steve