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