[Csync2] Best practices for multi-way replication?

Giampaolo Tomassoni g.tomassoni at libero.it
Mon Nov 26 21:27:36 CET 2007


> -----Original Message-----
> From: csync2-bounces at lists.linbit.com [mailto:csync2-
> bounces at lists.linbit.com] On Behalf Of Brett Randall
> 
> Hey all
> 
> I'm new to csync2. Just set it up today and had it synchronise 60gb of
> data from one side of the country to the other. Great tool, seems to
> work very well. Had the "Establishing SSL connection failed" error
> (running on Debian 4) and the only way I could get it to work was to
> regen the SSL key with "-batch" as other people have found.
> 
> Anyway, I want to know what the best practice is for keeping two
> servers
> totally up-to-date with minimal delay. My ideas so far are:
> 
> * Create a script that runs csync2 in a loop. Whenever it finishes,
> start it again.
> * Run it from cron every minute

I run csync2 from cron every 15' with fair results.

The most important thing to consider when adopting the cron way is to avoid
starting two parallel copies of csync2, which may happen when the update is
fairly large.

I use the "flock" command as an interlocking mechanism (from the
http://www.kernel.org/pub/linux/utils/util-linux/ package).

Giampaolo


> 
> My other problem is, what do I do on the other server(s)? Does it cause
> problems if two servers are both trying to push files to each other at
> the same time? As far as I can tell, this stuff isn't covered in the
> docco so just wondering what people's experiences are?
> 
> Thanks
> --
> Brett Randall
> InterPlanetary Solutions
> 
> _______________________________________________
> Csync2 mailing list
> Csync2 at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/csync2



More information about the Csync2 mailing list