Re: Recover anything from dropped database?

From: Erik Jones <erik(at)myemma(dot)com>
To: "John D(dot) Burger" <john(at)mitre(dot)org>
Cc: "pgsql-general postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Recover anything from dropped database?
Date: 2007-02-15 16:18:39
Message-ID: 45D487DF.8010403@myemma.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

John D. Burger wrote:
>> I have a backup as of last night, but I'd like to recover something
>> more recent if I can. If I'm stuck with the backup, I can just stop
>> the postmaster, drop the whole PG directory into place from the
>> backup, and restart, yes?
>
> I presume from the near-deafening silence there's nothing else I can
> do, which is no surprise, but I'd still like confirmation about how to
> restore the backup.
>
> (It turns out I can recover the changes since the backup annother way,
> since they all happened through interaction with CGI scripts, luckily
> GET rather than POST - I can "replay" the relevant URLs grepped from
> the web server log.)
>
> Still, I'm trying to figure out how to avoid my screw-up in the
> future. I'm not that familiar with the permissions stuff - is there
> any way to take away "drop DB privileges" from a user, or even all
> users? Again, this is PG 7.4.
AFAIK, once a database is dropped, it's gone. That's kinda the point in
dropping it. So, yeah, you're backup is the way to go. Also, since
you're going to have start from a fresh restore of your backup, I'd
recommend upgrading to a more recent version of Postgres, at least 8.1.x
if not the most recent which is 8.2.3.

As far as your questions regarding limiting users' permissions, read
the chapter on Database Roles and Priveledges from the docs:
http://www.postgresql.org/docs/8.2/interactive/user-manag.html

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Emi Lu 2007-02-15 16:36:10 postgresql 8.2 Installation error at "gmake"
Previous Message Demian Lessa 2007-02-15 16:15:20 Constraint enforcement