Sync multiple servers

Oliver Falk oliver at linux-kernel.at
Fri Mar 28 08:15:59 GMT 2008


Have a look at csync2:

http://oss.linbit.com/csync2/

I use it for my firewalls. Every time I change something on one of
these, I ran csync2 and the new configs get delivered to the other node
and all relevant services get restarted.

Very easy configuration. Uses shared keys. Include single files or whole
directory structures... Blah... Give it a try...

-of

Julian Field wrote:
> Read "man rsync" :-)
> 
> You can do your entire MailScanner config (on your primary config host,
> which might be a Linux box) with
> rsync -av --rsh=ssh /etc/MailScanner/
> root at second.mail.host.com:/etc/MailScanner/
> If you want to see what it will do, but without actually doing it, add
> "--dry-run" to the list of options near the start of that command.
> 
> You'll need to set up ssh keys so that the primary config host can
> successfully
> ssh root at second.mail.host.com date
> without asking for a password. Then you can bung it in a crontab entry
> and it will do it regularly. Personally I prefer to do it just on
> demand, so typing in a password isn't a big deal, and makes me stop and
> think before I do it (which I regard as a good thing :-)
> 
> You could copy the sendmail configuration similarly by copying
> /etc/aliases* and /etc/mail/ the same way.
> Once you have copied the files over, do an
> ssh root at second.mail.host.com /sbin/service MailScanner restart
> to force it to start up afresh with the new configuration files in place.
> 
> Do it with a nice new copy of MailScanner and the service MailScanner
> restart will reliably and completely do the job, I recently improved it.
> If your "service MailScanner restart" prints "....5....0 "then you have
> a recent enough version. If it just prints a long string of dots,
> without any digits every 5th dot, then you need a more recent version of
> the init.d script.
> 
> Best regards,
> Jules.
> 
> Gregory Wong wrote:
>> Hi everyone. I have a server running Postfix, MailScanner, SA, etc.
>> that is offsite from the main office. I am looking to setup a second
>> server and use round robin to allow mail sent to be “load balanced”
>> between the two servers. Can anyone recommend a way to sync server 2
>> with server 1 so the configuration is identical? I am also interested
>> in updating one server and syncing the changes onto the second one.
>>
>> Thanks. 
> 
> Jules
> 



More information about the MailScanner mailing list