Sync multiple servers
Julian Field
MailScanner at ecs.soton.ac.uk
Thu Mar 27 21:05:10 GMT 2008
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
--
Julian Field MEng CITP CEng
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store
MailScanner customisation, or any advanced system administration help?
Contact me at Jules at Jules.FM
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
PGP public key: http://www.jules.fm/julesfm.asc
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the MailScanner
mailing list