[postgis-users] Urgent help needed, messed up my postgis 2.1 server by installing latest QGIS pacake

Paul Ramsey pramsey at cleverelephant.ca
Tue Mar 18 16:33:09 PDT 2014


Stephen's advice should work, and you shouldn't have lost any data.
You probably broke the GDAL dependency PostGIS has, which would just
mean every time you try to do a PostGIS function it won't work. so no
data will go away, things just won't *work*. Follows Stephen's advice
in making sure your data dir is copied somewhere safe then get back to
a working state of software, then bring the data back.

On Tue, Mar 18, 2014 at 1:42 PM, Willem Buitendyk <willem at pcfish.ca> wrote:
> Ok I'm having trouble finding the data directory.  I know the data is
> somewhere because I can access non-postgis data still in the database.  I
> can even get a count back on the postgis data tables. I have a
> /var/lib/postgresql/9.3/main/base directory but no data directory.
>
>
> On Tue, Mar 18, 2014 at 1:22 PM, Morten Sickel <morten at sickel.net> wrote:
>>
>> If you installed postgres using apt-get, the data files should be in
>> /var/lib/postgres/9.3/data postgres is usually quite good at not messing
>> up data during upgrades, but just in case, I would make a quick backup. if
>> you do a sudo du -s /var/lib/postgres/9.3/data/base/* you should see at
>> least three directories - one of them contains your entire database, if it
>> is less than three there or none of them has a reasonable size, you may be
>> in trouble... (unless you have set up postgres to store data somewhere
>> else) If you have installed postgres through make /make install, the
>> databases may be stored somewhere else.
>>
>> Morten
>>
>>
>>
>> Willem Buitendyk skrev:
>> > The wifi on the plane is a lot erratic.  How could I check if I still
>> > have
>> > the data?  I'll certainly perform a backup as you suggest.  I don't have
>> > a
>> > separate virtual machine unfortunately.  I have far too many other
>> > systems
>> > associated to the current server, ip address, etc
>> >
>> >
>> > On Tue, Mar 18, 2014 at 1:03 PM, Morten Sickel <morten at sickel.net>
>> > wrote:
>> >
>> >> Did you accidentally upgrade postgis or postgres to a new minor
>> >> version?
>> >> An apt-get autoremove (after having done a apt-get remove qgis) will
>> >> only
>> >> remove dependencies that qgis have pulled in, I do not think it will
>> >> rollback anything to an older version - so I don't think that will
>> >> help,
>> >> although it should not do any harm either.
>> >>
>> >> As long as the database files still do exist, it should be possible to
>> >> get
>> >> back to a working system using a few apt-gets and/or dpkg commands. So
>> >> just in case, shut down the postgres server and do a backup of
>> >> /var/lib/postgresql/9.3/data (or if you have put the database files
>> >> somewhere else you shoud know where they are) (use tar or some other
>> >> utility that gets the file ownerships and permissions right)
>> >>
>> >> Do you have access to any other virtual or real machine? then you can
>> >> install postgres / postgis on that, stop postgres and just copy over
>> >> the
>> >> database files.
>> >>
>> >> Morten
>> >>
>> >> Willem Buitendyk skrev:
>> >> > Hi all,
>> >> >
>> >> > I'm currently sitting on a plane having made a huge mistake
>> >> > yesterday.
>> >>  I
>> >> > have a server that runs constantly, supplying data to clients on a
>> >> daily
>> >> > basis.  The server is Ubuntu 12.04 and I had successfully installed
>> >> and
>> >> > have been running PostGIS 2.1 and Postgresql 9.3 for the last 3
>> >> months.
>> >> >  Prior to leaving for my vacation I thought it would be great to
>> >> install
>> >> > QGIS so I could remotely view my database.  The problem is the QGIS
>> >> > install
>> >> > altered my postgis and libgdal1 dependencies.
>> >> >
>> >> > Here are the commands I issued that got me into this mess:
>> >> >
>> >> > sudo apt-get update
>> >> >
>> >> > sudo apt-get install qgis pythin-qgis
>> >> >
>> >> > sudo apt-get install qgis python-qgis
>> >> >
>> >> > sudo apt-get install qgis
>> >> >
>> >> > sudo apt-get install python-qgis
>> >> >
>> >> > gpg --keyserver keyserver.ubuntu.com --recv 47765B75
>> >> >
>> >> > gpg --export --armor 47765B75 | sudo apt-key add -
>> >> >
>> >> > sudo apt-get install qgis python-qgis
>> >> >
>> >> > sudo apt-get update
>> >> >
>> >> > sudo apt-get install qgis python-qgis
>> >> >
>> >> > sudo apt-get install python-software-properties
>> >> >
>> >> > sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
>> >> >
>> >> > sudo apt-get update
>> >> >
>> >> > sudo apt-get install qgis python-qgis qgis-plugin-grass
>> >> >
>> >> > sudo apt-get install libssl0.9.8
>> >> >
>> >> >
>> >> > I am uncertain how to proceeed because I remember something similar
>> >> > happening years ago (irony of ironies) and it ended up corrupting my
>> >> > Ubuntu
>> >> > server when I tried to repair.
>> >> >
>> >> >
>> >> > I'm looking for some sage advise to correct this a painless as
>> >> possible.
>> >> >  Is it safe to perform an apt-get autoremove?
>> >> >
>> >> > Please help an overstressed dad enjoy his vacation trip to Disney
>> >> > with
>> >> his
>> >> > wife and kids.  I promise I won't go installing packages all willy
>> >> nilly
>> >> > in
>> >> > the future.
>> >> >
>> >> >
>> >> > Thanks
>> >> >
>> >> >
>> >> > Willem
>> >> > _______________________________________________
>> >> > postgis-users mailing list
>> >> > postgis-users at lists.osgeo.org
>> >> > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>> >>
>> >>
>> >> _______________________________________________
>> >> postgis-users mailing list
>> >> postgis-users at lists.osgeo.org
>> >> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>> >>
>> >
>>
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users


More information about the postgis-users mailing list