Recovering data via raw table and field separators

Поиск
Список
Период
Сортировка
От John Wells
Тема Recovering data via raw table and field separators
Дата
Msg-id 44dddf400712040934q2c81bf42n8ff29020149b14e@mail.gmail.com
обсуждение исходный текст
Ответы Re: Recovering data via raw table and field separators  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-general
Guys,

We had a bit of a misfortunate communication breakdown here at work,
which led to a particular database not being backed up. Before we
recognized this problem, and entire database table was deleted.

I immediately copied the pgdata directory and have been able to find
the file that represents the data that was blown away. Fortunately, I
only really need to restore two pieces of data from the table...the id
field (primary key) and the employee_number field. Once I have this
data, I can re-populate and all my relationships will be honored.

I've been looking through the records with a hex editor, but the
unfortunate thing is that I either don't see consistency with field
separators or I'm overlooking them.

The table definition looks like this:

                                           Table "public.users"
          Column           |            Type             |
        Modifiers
---------------------------+-----------------------------+----------------------------------------------------
 id                        | integer                     | not null
default nextval('users_id_seq'::regclass)
 login                     | character varying(255)      |
 email                     | character varying(255)      |
 crypted_password          | character varying(40)       |
 salt                      | character varying(40)       |
 created_at                | timestamp without time zone |
 updated_at                | timestamp without time zone |
 remember_token            | character varying(255)      |
 remember_token_expires_at | timestamp without time zone |
 manager_id                | integer                     |
 employee_number           | integer                     |
 classification_id         | integer                     |
 name                      | character varying(255)      |
Indexes:
    "users_pkey" PRIMARY KEY, btree (id)

Can anyone guide me in how I might parse this out? There has to be a
way...I think I just need a helpful push ;)

Thanks!
John

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

Предыдущее
От: "Konrad Neuwirth"
Дата:
Сообщение: Tuning configuration
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Recovering data via raw table and field separators