Search Postgresql Archives

Recovering data via raw table and field separators

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux