Re: Lost database

From: Richard Huxton <dev(at)archonet(dot)com>
To: Antony Gelberg <antony(at)wayforth(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Lost database
Date: 2005-12-07 18:14:53
Message-ID: 4397269D.4010907@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Antony Gelberg wrote:
> Hi,
>
> This problem is related to an sql-ledger database, but given the nature,
> I think it's more appropriate here.
>
> Our sql-ledger server had a filesystem corruption. We do have backups,
> but it's only now, after reading the PostgreSQL manual, that I knew that
> it would have been a good idea to run pg_dump every now and then, via
> cron perhaps. We only have a filesystem backup of /var/lib/postgres.
>
> I have tried restoring the directory to a new server with postgresql not
> running. However, upon starting the database, sql-ledger reports
> database not found. It is also not listed in the psql -l command.

Well, if you restored a full backup of /var/lib/postgresql (that was
taken while PG wasn't updating any data) you should be OK. The fact that
you're not suggests that something is being overwritten.

Restore it again, make sure logging is turned on in your postgresql.conf
and see what it says about "recovering" etc.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2005-12-07 18:16:43 Re: FW: Advanced search form
Previous Message Ricardo Vaz - TCESP 2005-12-07 18:12:54 Log of CREATE USER statement