Very stupid backup I made - Mailing list pgsql-general

From Juraj Fedel
Subject Very stupid backup I made
Date
Msg-id 20030320061834.GA1654@alfa.juraj.fed
Whole thread Raw
Responses Re: Very stupid backup I made  ("Shridhar Daithankar" <shridhar_daithankar@persistent.co.in>)
List pgsql-general
First little background:
    I had created database of my owm (great success for me), was
able to use with OpenOffice thrue ODBC and spen couple of weeks to
populate that database. ANd everithing was going fine!
    At some point I decidet to reoragnize my hard disk (wanted to  prove
myself how good am I with linux). Of course I did not like to lose my data
that I have typeing in for weeks. So I made a backup (everybody are saying
hoe important backup is). But how did I do this!!!
    To make a backup I decided to simply copy /var/lib/pgsql to safe
place.
    After reinstlling linux (same distribution as was before), copying
my 'backup' back to the place and restarting server for my big surrprice I
was not able to connect to my database.
    Originally I had two databases created:
tester     - this is also my loginname (as ordinally user)
soff       - second database I made by 'createdb soff' as user tester

    Now when I use command 'psql' I get connect to 'tester' datase.
'\l' command list theese databasess:
tester=# \l
        List of databases
   Name    |  Owner   | Encoding
-----------+----------+-----------
 template0 | postgres | SQL_ASCII
 template1 | postgres | SQL_ASCII
 tester    | tester   | SQL_ASCII
(3 rows)

Note that there is no 'soff' database. Command '\dt' say: 'No relations
foud'. At this point I issued command '\c soff' even if that is not listed
above as existing. And DO get connect to 'soff' database.

tester=# \c soff
You are now connected to database soff.
soff=# \dt
No relations found.
soff=#

But all tables are gone.
After little peeking I found that file data/base/16593/16685 contain data
in soff database that I need.

[root@alfa pgsql]# grep -rl nekret .
./data/base/16593/16685
./data/pg_xlog/0000000000000000

Simillary other file contains data from table in 'tester' databse:
[root@alfa pgsql]# grep -lr Fedel .
./data/base/16599/16606
./data/pg_xlog/0000000000000000

In those directories are also many other files (some of them were probabbly
created when I was useing pgaccess).
    Now I am wondering if there is some chance to recover data from
'soff' database which are in ./data/base/16593/16685 file.
    And after You stop laughing (not that I did not deserved it :) maybe
You can tell me where can I find some reading about backup!
Thanks
Juraj

pgsql-general by date:

Previous
From: "Ricardo Ryoiti S. Junior"
Date:
Subject: Re: Postmaster error (newbie questian)
Next
From: "Shridhar Daithankar"
Date:
Subject: Re: Very stupid backup I made