Help with Database Recovery

Поиск
Список
Период
Сортировка
От Hancock, David (DHANCOCK)
Тема Help with Database Recovery
Дата
Msg-id 09328AED5429D311A3000008C7911B1007CF7BED@exanpmb1.arinc.com
обсуждение исходный текст
Список pgsql-general
Please--I have searched everywhere I can think of and have found no guidance
for recovering databases where the /var/lib/pgsql/base directories are
intact but there's no pg_dump file to work from.  I need to do this because
I stupidly but inadvertently uninstalled PostgreSQL and then had to
reinstall it.

Some things that I tried:

1. just copy the old base/* directories into the newly created
/var/lib/pgsql/base directory.  psql was not aware of the databases.
2. use createdb to create a database, and then copy the old data files into
the corresponding base/<db> directory. psql said "couldn't open cache for
user 40" or something similar.
3. modified uid for postgres user to 40, reinstalled PostgreSQL, did "2"
again, similar result.

I'd be very grateful for suggestions on where to look for guidance for this
kind of recovery, and I'll summarize my findings to the list.

It was a great irony that Chapter (lucky) 13 in the Admin documentation
("Database Recovery") only says "This section needs to be written.
Volunteers?"  If I learn something, I'll be sure to write it up.

Original message to list:

> I have inadvertently uninstalled PostgreSQL and subsequently reinstalled
> it, which has rendered my existing databases inaccessible.  I'd like to be
> able to recover them.  There is no pgdump output to work from.
>
> If anyone knows of a description of how to recover the data withing the
> (intact) datafiles from the directories in /var/lib/pgsql/base, I'd be
> very grateful to learn of it.
>
> I have searched the documentation and the Momjian book and the
> postgresql.org site, but haven't found anything that helps me.
>
> If I'm barking up the wrong list, I'd like to know that, too.
>
> Cheers!
> --
> David Hancock | dhancock@arinc.com | 410-266-4384
>

В списке pgsql-general по дате отправления:

Предыдущее
От: "Hancock, David (DHANCOCK)"
Дата:
Сообщение: Help with Database Recovery
Следующее
От: Don Baccus
Дата:
Сообщение: Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL