Re: Unable to recover tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "G(dot) J(dot) Walsh" <gjwalsh(at)dscdirectionalservices(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Unable to recover tables
Date: 2008-05-25 23:46:33
Message-ID: 4997.1211759193@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"G. J. Walsh" <gjwalsh(at)dscdirectionalservices(dot)com> writes:
> Thanks for your earlier reply, Tom.
> What I did was:
> Stop the server: service postgresql stop
> Remove the directory tree completely: rm -rf /var/lib/pgsql
> Restore the full tree:
> /bin/cp -r /bup/previous/var/lib/pgsql /var/lib/pgsql
> Ensure postgres owns all:
> chown postgres:postgres -R /var/lib/pgsql
> Restart the server: service postgresql restart

> At this point I can once again access the original data base
> and \l shows it correctly, but \d shows no relations.

Do you see any rows at all in pg_class in that database?

Also, where did /bup/previous/var/lib/pgsql come from? If this was
a filesystem-level backup that was taken while the postmaster was
running, you may have consistency problems in it.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Josep Sànchez Mesegué 2008-05-26 21:18:21 Cron and shell script as user postgres to run sql command
Previous Message Emil Obermayr 2008-05-25 19:15:58 Re: socket versus 127.0.0.1