[postgis-users] PostGIS raster data restore issue

Regina Obe lr at pcorp.us
Mon Jul 25 14:42:00 PDT 2016


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
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/20160725/87e8492c/attachment.html>


More information about the postgis-users mailing list