Re: hardware failure - data recovery

Поиск
Список
Период
Сортировка
От Jerry Sievers
Тема Re: hardware failure - data recovery
Дата
Msg-id m3hcxyew83.fsf@homie.jerrysievers.com
обсуждение исходный текст
Ответ на hardware failure - data recovery  (Rick Gigger <rick@alpinenetworking.com>)
Ответы Re: hardware failure - data recovery  (Rick Gigger <rick@alpinenetworking.com>)
Список pgsql-general
Rick Gigger <rick@alpinenetworking.com> writes:

> To make a long story short lets just say that I had a bit of a
> hardware failure recently.
>
> If I got an error like this when trying to dump a db from the mangled
> data directory is it safe to say it's totally hosed or is there some
> chance of recovery?

Why don't you try dumping just the critical tables using pg_dump -t?

Also perhaps use psql and try looking up in pg_class for the damaged
tables by OID.  You may be able to drop just a few tables and then
dump the DB normally.  This assumes the damaged table(s) are
non-critical...

I suggest you stop Pg first, take an FS backup of the entire cluster
before this so you cahn try various approaches if needed.

> pg_dump: ERROR:  could not open relation 1663/18392/18400: No such
> file or directory
> pg_dump: SQL command to dump the contents of table "file" failed:
> PQendcopy() failed.
> pg_dump: Error message from server: ERROR:  could not open relation
> 1663/18392/18400: No such file or directory
> pg_dump: The command was: COPY public.file (vfs_id, vfs_type,
> vfs_path, vfs_name, vfs_modified, vfs_owner, vfs_data) TO stdout;
>
> Thanks,
>
> Rick
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faq
>

--
-------------------------------------------------------------------------------
Jerry Sievers   305 854-3001 (home)     WWW ECommerce Consultant
                305 321-1144 (mobile    http://www.JerrySievers.com/

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

Предыдущее
От: "Harpreet Dhaliwal"
Дата:
Сообщение: Re: why not kill -9 postmaster
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Upgrade 7.4 to 8.1 or 8.2?