[postgis-users] TR: postgis_restore.pl

Jeff McKenna jmckenna at gatewaygeomatics.com
Sun Jun 27 11:03:33 PDT 2021


Hi Alain,

I always use a 'pg_dump' command to backup my client dbs, but make sure 
to use the switch "--format=c" to create a custom dump, which I have 
found is the best to move across different operating systems.  (and then 
you can 'pg_restore' that dump)

I no longer use that perl script.

-jeff



-- 
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/


On 2021-06-25 3:20 a.m., Alain Benard wrote:
> Hi ,
> 
> Because of problem with Postgres 12 / Postgis 2.5.5 on Centos 8  we test 
> to install Postgres 12 / Postgis 3.0.
> 
> In the pats i have used your script postgis_restore.pl and this script 
> is again present in the directory 
>   /usr/pgsql-12/share/contrib/postgis-3.0/. In this script i find :
> 
> # # Copyright (C) 2009 Paul Ramsey <pramsey at cleverelephant.ca 
> <mailto:pramsey at cleverelephant.ca>>
> 
> # Tested on:
> 
> #
> 
> #    pg-8.4.9/pgis-1.4.3    => pg-8.4.9/pgis-2.0.0SVN
> 
> #    pg-8.4.9/pgis-2.0.0SVN => pg-8.4.9/pgis-2.0.0SVN
> 
> #    pg-8.4.9/pgis-2.0.0SVN => pg-9.1.2/pgis-2.0.0SVN
> 
> #    pg-9.1b3/pgis-1.5.3    => pg-9.1.1/pgis-2.0.0SVN
> 
> On the server postgis 2.5.5 i dump with –Fc and on the new (Postgis3) i 
> use the script with some mistakes :
> 
> ERREUR:  la relation « geometry_columns » n'existe pas
> 
> LIGNE 1 : UPDATE topology.topology t set srid = g.srid FROM geometry_c...
> 
>                                                              ^
> 
> ERREUR:  la relation « spatial_ref_sys » n'existe pas
> 
> LIGNE 1 : UPDATE spatial_ref_sys o set auth_name = n.auth_name, auth_s...
> 
>                   ^
> 
> ERREUR:  la relation « spatial_ref_sys » n'existe pas
> 
> LIGNE 1 : INSERT INTO spatial_ref_sys SELECT * FROM _pgis_restore_spat...
> 
>                        ^
> 
> ERREUR:  la relation « spatial_ref_sys » n'existe pas
> 
> ERREUR:  la relation « spatial_ref_sys » n'existe pas
> 
> ERREUR:  la relation « spatial_ref_sys » n'existe pas
> 
> It seems that the restore is ok but what is your opinion about using 
> this perl script today ??
> 
> Thank you for advance.
> 
> Alain.
> 
> INRA
> 
> *Alain BENARD*
> 
> *Administrateur Systèmes d’Information*
> 
> _alain.benard at inra.fr <mailto:alain.benard at inra.fr>_
> 
> *Unité SILVA*
> 
> Tél. : +33 3 83 39 40 84
> 
> Route d’amance
> 
> 54 280 Champenoux
> 
> inra.fr <http://www.inra.fr>
> 
> INRA
> 
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
> 



More information about the postgis-users mailing list