Uninstalled working db by mistake

Started by Howard Coleabout 10 years ago7 messagesgeneral
Jump to latest
#1Howard Cole
howardnews@selestial.com

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.

#2David Wilson
dw+pg@hmmz.org
In reply to: Howard Cole (#1)
Re: Uninstalled working db by mistake

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

#3Karsten Hilbert
Karsten.Hilbert@gmx.net
In reply to: David Wilson (#2)
Re: Uninstalled working db by mistake

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

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#4Howard Cole
howardnews@selestial.com
In reply to: David Wilson (#2)
Re: Uninstalled working db by mistake

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.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#5David Wilson
dw+pg@hmmz.org
In reply to: Howard Cole (#4)
Re: Uninstalled working db by mistake

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

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#6Howard Cole
howardnews@selestial.com
In reply to: David Wilson (#5)
Re: Uninstalled working db by mistake

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.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#7Gavin Flower
GavinFlower@archidevsys.co.nz
In reply to: Howard Cole (#6)
Re: Uninstalled working db by mistake

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...

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general