[postgis-users] how to backup/restore

Nicholas Bower nick at petangent.net
Sun Apr 11 21:33:17 PDT 2010


On Mon, Apr 12, 2010 at 12:21 PM, Ben Madin
<lists at remoteinformation.com.au>wrote:

> OK
>
> On 12/04/2010, at 10:03 , Nicholas Bower wrote:
>
> > 2. Dump just this separate data schema using pg_dump -Fc -N <schema>
>
> I think here you mean -n?, but it's six of one and half a dozen of the
> other. I routinely use different schema's for different aspects of the
> database, hence easier to just exclude one.
>

Yes -n you're right.


>
> > I note your solution of the separate schema using default path hack -
> interesting that this works (assume you change the search path for all db
> updater roles).
>
> I'm not sure what you mean by this question, sorry. I do change the
> search_path for the database -
>
>        ALTER database SET search_path TO data, reference, users, gis;
>
> if that is what you are referring to?
>

Yep that's it - you're changing the search path not just of the restore, but
all roles using that database ongoing so they can find the postgis
functions.  When I started experimenting with Postgis back in 2003, I
couldn't get it to work so ever since I've used public schema for postgis.
 I should have tried harder ;)

Btw have you restored your backups from scratch before and found them to
work?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100412/95834244/attachment.html>


More information about the postgis-users mailing list