Re: restoring a database to its initial state

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Manlio Perillo <manlio(dot)perillo(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: restoring a database to its initial state
Date: 2010-03-13 16:20:54
Message-ID: 2473.1268497254@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> 2010/3/13 Manlio Perillo <manlio(dot)perillo(at)gmail(dot)com>:
>> Usually when I need to restore a database to its initial state, what I
>> do is to simply drop it, and then re-create it.
>> However on a shared hosting this is not possible.

> Usually people use a install and a uninstall scripts. First creates
> dbobjects, second removes objects.

"pg_dump --clean" can help with creating an uninstall script.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lacey Powers 2010-03-13 19:02:53 Re: ERROR: Package compat-postgresql-libs-4-1PGDG.rhel4.i386.rpm is not signed
Previous Message Adrian von Bidder 2010-03-13 15:06:02 Re: restoring a database to its initial state