<div dir="ltr"><div>Thank you, i will try you solution and come back to you later.<br><br></div>Cheers<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 3, 2013 at 1:41 PM, Morten Sickel <span dir="ltr"><<a href="mailto:morten@sickel.net" target="_blank">morten@sickel.net</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ahh, I see. You may still use log-shipping, transfering the xlog-files on<br>
a flash-disk, but it is probably just as easy to do an entire dump/restore<br>
cycle.<br>
<br>
(on my servers (running ubunto 1204, I have pg_basebackup, pg_dump,<br>
pg_dumpall and pg_restore which may be usesd - or you may do on the<br>
"master":<br>
<br>
cd $POSTGRESDATADIRECTORY<br>
psql -c "SELECT pg_start_backup('label', true)"<br>
rsync -a ${PGDATA}/ $USBDRIVE --exclude postmaster.pid<br>
psql -c "SELECT pg_stop_backup()"<br>
<br>
<br>
then on the slaves<br>
stop the postgres server<br>
copy the files from the usb into the data directory<br>
start the postgres server<br>
<br>
)<br>
<br>
Morten<br>
<br>
<br>
thomas lechauve skrev:<br>
<div class="HOEnZb"><div class="h5">> Unfortunately, servers cannot communicate. "client" servers are not<br>
> connected to a network, they work in standalone, so i have to use an usb<br>
> drive to transport backup file, then restore it.<br>
><br>
><br>
> On Mon, Jun 3, 2013 at 1:12 PM, Morten Sickel <<a href="mailto:morten@sickel.net">morten@sickel.net</a>> wrote:<br>
><br>
>> It depends a bit...<br>
>><br>
>> If those servers are able to communicate with each other on port 5432,<br>
>> you<br>
>> can use streaming replication to make one of the servers being a (read<br>
>> only) mirror of the other. - or you may set up log-shipping streaming<br>
>> replication, in which case te master server only needs to be able to<br>
>> send<br>
>> files (i.e. using rsync) to the slave server.<br>
>><br>
>> In both cases, the servers must be identical - same versions and the<br>
>> same<br>
>> databases - which all are read only on the slave... (You may of course<br>
>> run<br>
>> more postgres servers on the slave, where one is dedicated to the<br>
>> OSM-data.)<br>
>><br>
>> Just ask me if you need some assistance, I have set up a few<br>
>> streaming-replication and log-shipping replication servers.<br>
>><br>
>> Morten<br>
>><br>
>> thomas lechauve skrev:<br>
>> > Hello,<br>
>> ><br>
>> > I am trying to synchronize two PostGIS databases.<br>
>> ><br>
>> > I have a reference server which is filled and updated every day with<br>
>> OSM<br>
>> > data. For this purpose I recreate the whole database. But now i want<br>
>> to<br>
>> > update another database which is not on the same server based on the<br>
>> first<br>
>> > database without recreate it.<br>
>> ><br>
>> > pg_dump/pg_restore tools are probably what i am looking for, but i<br>
>> cannot<br>
>> > find a way to achieve my purposes.<br>
>> ><br>
>> > Do i have to keep trying with those tools or is there another way ?<br>
>> ><br>
>> > Perhaps a SQL script could do it but i want to avoid it because i am<br>
>> no<br>
>> > expert in PostGIS and databases in general.<br>
>> ><br>
>> > Any recommendations ?<br>
>> ><br>
>> > Cheers<br>
>> ><br>
>> > --<br>
>> > Thomas LECHAUVE<br>
>> > _______________________________________________<br>
>> > postgis-users mailing list<br>
>> > <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
>> > <a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
>> ><br>
>><br>
>><br>
>> _______________________________________________<br>
>> postgis-users mailing list<br>
>> <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
>> <a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> Thomas LECHAUVE<br>
> portable : <a href="tel:%2B33%206%2051%2021%2007%2040" value="+33651210740">+33 6 51 21 07 40</a><br>
> fixe : <a href="tel:%2B33%209%2082%2037%2041%2094" value="+33982374194">+33 9 82 37 41 94</a><br>
> _______________________________________________<br>
> postgis-users mailing list<br>
> <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
><br>
<br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div>Thomas LECHAUVE</div><div>portable : +33 6 51 21 07 40</div><div>fixe : +33 9 82 37 41 94</div>
</div></div>