Re: Is it possible to recover the schema from the raw files?

Поиск
Список
Период
Сортировка
От Venkata Balaji N
Тема Re: Is it possible to recover the schema from the raw files?
Дата
Msg-id CAEyp7J8jF8WRixB7h0Lp3iiEVhYa+Fwf5-WYDe05ueNdpQUByA@mail.gmail.com
обсуждение исходный текст
Ответ на Is it possible to recover the schema from the raw files?  ("Tomas J Stehlik" <tomas@stehlik.co.uk>)
Ответы Re: Is it possible to recover the schema from the raw files?
Список pgsql-general

On Sun, Apr 24, 2016 at 2:30 AM, Tomas J Stehlik <tomas@stehlik.co.uk> wrote:
Hello,

There was a corruption to the file system due to sudden shutdown of Windows
7.

The attempt to connect to one of the databases results in multiple errors,
like the following one:
ERROR:  invalid page in block 58 of relation base/161326/233745

Several raw files were completely lost (zeroed), thus utterly disabling the
functionality of this particural database.

The raw files were backed up separately outside of the original data folder
upon discovery of the issue.

I would like to ask whether it is possible to recover the database schema
from the raw files?
The data itself is less important in this case.

You will have to restore the data-directory from the backup and perform recovery (if required). This will get you the database schema including the data (or whatever is part of the backup). If you are not worried about the data, then, you will need to manually rebuild the database schema, recovery process will not help you much here.

If you cannot re-build the schema manually (meaning: if you do not have scripts available to build the schema), then you will need to restore the database from the backup and manually cleanup all the data, which is quite a bit of work.

Regards,
Venkata B N

Fujitsu Australia 

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

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: Proper relational database?
Следующее
От:
Дата:
Сообщение: Re: Proper relational database?