[postgis-users] Loading a PostGIS dump

Brian Wilson brian at wildsong.biz
Wed Aug 26 13:00:44 PDT 2015


"Please give more details" :-) Sorry -kidding-  just had to say that.

These are just the suggestions of another newbie. Take with grain of salt.

Do the easiest thing - kill the loader, drop the database, create the user,
create the database as geo_user and start again.

If you use geo_user to create the database you know he exists and that he
owns the database so he won't have trouble writing to it. You can back off
the perms later if you want. "createdb -U geo_user foo"

I've never used that postgis_restore.pl script to do a load, I just send
the sql to psql (upon reviewing docs on that script I have probably been
doing it a bad way! :-)

Help for the script mentions that you have to install topology and raster
as separate steps before loading IFF you were using them before.

Crank up debugging, don't wait hours for results. I looked up the script
and it has  a -v option. Try that. You are using a real computer so use the
tee command to watch your error file as the script runs.

Instead of ending your command with "> errors.txt" use "| tee errors.txt"
This will pipe the errors from stdout to tee and tee will output both the
errors.txt file and also send the output stdout so you see it on your
screen as it happens.


Another idea, you should be able to open another window or pgadmin3 and
examine the database as it gets loaded -- be like the job descriptions --
"must be able to multitask". It's a database, would not be much fun if you
could not access it from more than one program.

Brian


On Wed, Aug 26, 2015 at 12:01 PM, Lee Hachadoorian <
Lee.Hachadoorian+L at gmail.com> wrote:

> New Linux machine, new PostGIS install (postgresql-9.3-postgis-2.1). I
> created DB and added extensions. Now trying to load database using
> postgis_restore.pl. This is a large database (63GB dump, created from
> DB that was probably 600GB or more).
>
> The script ran for a while. Then it stopped at
>
>  setval
> --------
>      53
> (1 row)
>
> It's been hanging out there for hours now, so I assume something is
> hopelessly wrong.
>
> The loader created foo.dump.lst at 10:50am and I piped errors to a
> text file. Errors file shows that I did not create a user who owns one
> of the schemas. `ERROR:  role "geo_user" does not exist` appears 260
> times.
>
> Can I just kill the loader script with Ctrl+C? Is database
> recoverable? Should I just drop database and try again from the
> beginning? Is failure related to missing role, or if not how do I
> figure out what the error is so that I can get this to run to
> completion?
>
> Best,
> --Lee
>
> --
> Lee Hachadoorian
> Asst Professor of Geography, Temple University
> http://geospatial.commons.gc.cuny.edu/
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>



-- 
Brian Wilson, GISP
@brian_32768
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150826/12a44033/attachment.html>


More information about the postgis-users mailing list