From: | "John Wells" <jb(at)sourceillustrated(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Recovering data via raw table and field separators |
Date: | 2007-12-04 17:34:51 |
Message-ID: | 44dddf400712040934q2c81bf42n8ff29020149b14e@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2007-12-04 17:48:19 | Re: Recovering data via raw table and field separators |
Previous Message | Konrad Neuwirth | 2007-12-04 17:17:22 | Tuning configuration |