[postgis-users] PostGIS raster data restore issue

Kevin Berger Kevin.Berger at silvacom.com
Wed Jul 27 07:17:30 PDT 2016


Thanks Regina, that helps.

1.       When will PostGIS 2.3 be available?

2.       FYI - although custom might be preferred, we had problems restoring custom backup. We were able to restore the backup in plain text format without issue. Our database is approximately 30 GB.

From: postgis-users [mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of Regina Obe
Sent: July 25, 2016 15:42
To: 'PostGIS Users Discussion'
Subject: Re: [postgis-users] PostGIS raster data restore issue

Unfortunately you have to create the database first.  I'm working on fixing this for PostGIS 2.3 so you can do without creating db first, but for PostGIS 2.2.2 steps would be



1)      Do your backup with pg_dump.exe (custom is preferred over plain text)

2)      Create new database, install postgis extension

3)      Run the share/contrib/postgis-2.2/ rtpostgis_proc_set_search_path.sql  (note this script is there for PostGIS 2.2.2+)

4)      Restore your data as usual with pg_restore (if custom backup)  or psql if plain text.

Hope that helps,
Regina
http://www.postgis.us
http://postgis.net



From: postgis-users [mailto:postgis-users-bounces at lists.osgeo.org] On Behalf Of Kevin Berger
Sent: Monday, July 25, 2016 1:06 PM
To: postgis-users at lists.osgeo.org<mailto:postgis-users at lists.osgeo.org>
Subject: [postgis-users] PostGIS raster data restore issue

Hi,

We want to test our PostGIS Version 2.2.2.1/PostgreSQL 9.5.2.1 restore. We have raster data loaded into the database.

The backup command we are using is: pg_dump.exe -c -C (We specify -C as we want the SQL for creating databases to be in the dump file - we want to simplify the restore operation by having the database automatically created as opposed to having to create an empty database then restore the data into it). The dump file is 32 GB so modifying the dump file in Notepad++ is not an option.

The restore command we are using is: psql -U postgres -f <dumpfile>. However, we get several restore errors such as:

ERROR:  function st_bandmetadata(public.raster, integer[]) does not exist

I am thinking that the only thing we can do is to create an empty database then restore the data into it (which as I mentioned adds more steps to restore). Is my rationale correct?

NOTE: the restore does work fine on a database that does not contain raster data.

Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20160727/7d3c0729/attachment.html>


More information about the postgis-users mailing list