[postgis-users] Correct dump and restore

Havard Tveite havard.tveite at umb.no
Fri Nov 10 07:35:38 PST 2006


Frank Koormann wrote:
> * Stefan Schwarzer <stefan.schwarzer at grid.unep.ch> [061110 15:55]:
>> Under "Hard upgrade" I don't find anything. I guess you mean this  
>> section (page 5)? Seems still rather complicated....
> 
> I think strk was talking about the online Doku:
> http://postgis.refractions.net/docs/ch02.html#upgrading
> 
> Essentially it is 
> 
> $ pg_dump -Fc olddb olddb.dump
> 
> and 
> 
> $ sh utils/postgis_restore.pl lwpostgis.sql newdb olddb.dump > restore.log

And you should be able to add createdb parameters at the end of
the postgis_restore parameter list (useful if you are using
non-default text encoding for the database):

$ sh utils/postgis_restore.pl lwpostgis.sql newdb olddb.dump -E=UNICODE > restore.log

Due to a bug, this does not work in 1.1.6, but shall now have been
fixed in "trunk" (see bug 124).

Håvard

> 
> The rest are checks and cleanups if migration from older postgresql
> versions -  which isn't the case in your situation.
> 
> Regards,
> 
>         Frank
> 

-- 
Håvard Tveite
Department of Mathematical Sciences and Technology, UMB
Drøbakveien 14, POBox 5003, N-1432 Ås, NORWAY
Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt



More information about the postgis-users mailing list