From: | patrick <patrick(at)11h11(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | recover without $PGDATA/global |
Date: | 2006-04-05 14:50:28 |
Message-ID: | 4433D934.8020808@11h11.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
here's a resume of what i am doing. note that i don't have the global
direcotry of $PGDATA.
----------------
first of all reinstall a new hard-drive and installed the same version
of postgresql (8.0.4) with the same configuration.
now doing a initdb somewhere on the new hd.
then createdb the same database (with the same name)
so now i have a working structure (with a global dir)
now with oid2name i can find what is what in my $PGDATA/base
so now it's time to put my $BACKUP/$PGDATA/base in the new $PGDATA/base
but renaming my back-up with the new oid (only the first folder not
sub-dir.) - i don't replace template0, template1
now a cp -R $BACKUP/$PGDATA/pg_xlog $PGDATA/
now a cp -R $BACKUP/$PGDATA/pg_clog $PGDATA/
now i have to use pg_resetxlog to fit my needs. this is what i'm not
sure, i have 00000001000000000000000E and 00000001000000000000000F in
pg_xlog. what should i use as arguments to pg_resetxlog -o -x -l.
after finding the good arguments, i will be able to start postmaster and
see my tables, cause right now it's always no realtions founds no matter
my test with pg_resetxlog?
----------------
also is it true that i will need to change also the oid of each files in
$PGDATA/base/mydboid/* - this is impossible since i don't know the
structure of my table before the hd crashed.
yes and sorry for cross-posting to general...
regards,
pat
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2006-04-05 14:54:09 | Re: Stats collection on Windows |
Previous Message | Tom Lane | 2006-04-05 14:49:00 | Re: Stats collection on Windows |