Thread: Uninstalled working db by mistake

Uninstalled working db by mistake

From
Howard News
Date:
Hi,

I uninstalled the wrong version of postgres on Ubuntu using apt-get remove postgresql-9.0, convinced that this was an old unused version. You guess the rest...

The data files still appear to be there, all 485GB of them. Can these be restored?

Thanks.

Re: Uninstalled working db by mistake

From
David Wilson
Date:
Hi Howard,

So long as you haven't touched anything else, simply reinstalling the
package should restore your cluster. Debian packages only do
initialization if the data directories are missing.


David

On Thu, Mar 24, 2016 at 05:29:23PM +0000, Howard News wrote:
> Hi,
>
> I uninstalled the wrong version of postgres on Ubuntu using apt-get remove
> postgresql-9.0, convinced that this was an old unused version. You guess the
> rest...
>
> The data files still appear to be there, all 485GB of them. Can these be
> restored?
>
> Thanks.


Re: Uninstalled working db by mistake

From
Karsten Hilbert
Date:
On Thu, Mar 24, 2016 at 05:34:21PM +0000, David Wilson wrote:

> So long as you haven't touched anything else, simply reinstalling the
> package should restore your cluster. Debian packages only do
> initialization if the data directories are missing.

Just for good measure I would strongly suggest taking a full
file level copy of the datadir before reinstalling the package.

Karsten
--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


Re: Uninstalled working db by mistake

From
Howard News
Date:
Thanks David,

Unfortunately my cluster wont start - I am not entirely sure on the
state of  postgresql-9.0, this is the output from dpkd --list



rc  postgresql-8.4 8.4.6-0ubuntu1 object-relational SQL database,
version 8.4
rc  postgresql-9.0 9.0.4-1~lucid1 object-relational SQL database,
version 9.0
ii  postgresql-9.1 9.1.20-1.pgdg1 object-relational SQL database,
version 9.1
ii  postgresql-9.2 9.2.15-1.pgdg1 object-relational SQL database,
version 9.2

Does this mean it is removed?

On 24/03/2016 17:34, David Wilson wrote:
> Hi Howard,
>
> So long as you haven't touched anything else, simply reinstalling the
> package should restore your cluster. Debian packages only do
> initialization if the data directories are missing.
>
>
> David
>
> On Thu, Mar 24, 2016 at 05:29:23PM +0000, Howard News wrote:
>> Hi,
>>
>> I uninstalled the wrong version of postgres on Ubuntu using apt-get remove
>> postgresql-9.0, convinced that this was an old unused version. You guess the
>> rest...
>>
>> The data files still appear to be there, all 485GB of them. Can these be
>> restored?
>>
>> Thanks.
>



Re: Uninstalled working db by mistake

From
David Wilson
Date:
On Thu, Mar 24, 2016 at 05:44:27PM +0000, Howard News wrote:
> Thanks David,
>
> Unfortunately my cluster wont start - I am not entirely sure on the state of
> postgresql-9.0, this is the output from dpkd --list
>
>
>
> rc  postgresql-9.0 9.0.4-1~lucid1 object-relational SQL database, version
> 9.0

Per the heading printed by dpkg --list, this means the package is in the
removed state, but it's config files are still present. "apt-get install
postgresql-9.0" should be all required.


David


> ii  postgresql-9.1 9.1.20-1.pgdg1 object-relational SQL database, version
> 9.1
> ii  postgresql-9.2 9.2.15-1.pgdg1 object-relational SQL database, version
> 9.2
>
> Does this mean it is removed?
>
> On 24/03/2016 17:34, David Wilson wrote:
> >Hi Howard,
> >
> >So long as you haven't touched anything else, simply reinstalling the
> >package should restore your cluster. Debian packages only do
> >initialization if the data directories are missing.
> >
> >
> >David
> >
> >On Thu, Mar 24, 2016 at 05:29:23PM +0000, Howard News wrote:
> >>Hi,
> >>
> >>I uninstalled the wrong version of postgres on Ubuntu using apt-get remove
> >>postgresql-9.0, convinced that this was an old unused version. You guess the
> >>rest...
> >>
> >>The data files still appear to be there, all 485GB of them. Can these be
> >>restored?
> >>
> >>Thanks.
> >
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general


Re: Uninstalled working db by mistake

From
Howard News
Date:

On 24/03/2016 17:52, David Wilson wrote:
> Per the heading printed by dpkg --list, this means the package is in
> the removed state, but it's config files are still present. "apt-get
> install postgresql-9.0" should be all required. David

David,

I owe you a beer. Nay - several drinks of your choice.

Howard.



Re: Uninstalled working db by mistake

From
Gavin Flower
Date:
On 25/03/16 07:03, Howard News wrote:
>
>
> On 24/03/2016 17:52, David Wilson wrote:
>> Per the heading printed by dpkg --list, this means the package is in
>> the removed state, but it's config files are still present. "apt-get
>> install postgresql-9.0" should be all required. David
>
> David,
>
> I owe you a beer. Nay - several drinks of your choice.
>
> Howard.
>
>
>
David,

May I suggest you choose something like:
Tequila Ley .925 which is a mere $3,500,000

see:
http://www.therichest.com/luxury/most-expensive/the-10-most-expensive-alcoholic-drinks-on-earth/?view=all



Cheers,
Gavin

P.S.
Smiley's omitted due to severe budget constraints...