From: jehan procaccia <jehan.procaccia@free.fr>
To: pgsql-admin@postgresql.org
Subject: restore database from bare files
Date: Wed, 29 Jun 2005 20:20:06 +0200
Message-ID: <42C2E656.6010403@free.fr> (raw)
hello,
I crashed my server, and I didn't took the precaution to pg_dump one of
my database :-(
However I do have a tar file of the filesystem , it was on a RHEL 3 with
rh-postgresql-server-7.3.9-2 and I have a tar of /var/lib/pgslq
will just restoring the whole directory /var/lib/pgsql will suffices ?
or should I do some tricky operations ?
Here's what I have for example ..., how do I match a database name to
the number -> here 16975 is which database ?:
drwx------ / 0 2005-03-08 17:38:24 pgsql/data/base/16975/
-rw------- / 475136 2005-03-08 17:38:24
pgsql/data/base/16975/1255
-rw------- / 32768 2005-03-08 17:38:24
pgsql/data/base/16975/1247
and
-rw------- / 0 2005-03-08 17:38:22 pgsql/data/global/16675
and
drwx------ / 0 2005-05-31 18:14:51 pgsql/data/pg_xlog/
-rw------- / 16777216 2005-05-31 18:08:53
pgsql/data/pg_xlog/0000000000000011
-rw------- / 16777216 2005-06-28 15:33:10
pgsql/data/pg_xlog/0000000000000010
drwx------ / 0 2005-06-20 14:54:12 pgsql/data/pg_clog/
-rw------- / 262144 2005-06-01 18:15:07 pgsql/data/pg_clog/0000
-rw------- / 262144 2005-06-20 14:49:10 pgsql/data/pg_clog/0001
-rw------- / 32768 2005-06-28 15:10:19 pgsql/data/pg_clog/0002
and config files
-rw------- / 3080 2005-04-22 18:33:17 pgsql/data/pg_hba.conf
-rw------- / 1441 2005-03-08 17:38:22 pgsql/data/pg_ident.conf
-rw------- / 5331 2005-03-25 15:19:47
pgsql/data/postgresql.conf
-rw------- / 59 2005-06-28 15:27:14
pgsql/data/postmaster.opts
The crashed happened during an upgrade to RHEL 4 , so now on RHEL
postgresql version will be postgresql-server-7.4.7-2.RHEL4.1
<https://rhn.redhat.com/network/software/packages/details.pxt?cid=2866&id_combo=500000648%7c28296...;!
any incompatibility or migration from 7.3.9-2 ?
thanks.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: jehan.procaccia@free.fr
Subject: Re: restore database from bare files
In-Reply-To: <42C2E656.6010403@free.fr>
References: <42C2E656.6010403@free.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox