Jake Vickers wrote:
Massimiliano Fontana wrote:
Hi . I'm trying to create a basic "failover" system not too complex .
In other words , I just would like to have my unique domain and user
mailboxes replicated on another server .
In the event of a crash , the only thing to do for me would be to set
on the firewall the "backup" mail server ip ( incoming mail from my
ISP which handles domain and mail) and inform users to use
squirrelmail pointing to a different server .
The backup/restore scripts seems to be what I need . The only question
is :
Once restored everything through the restore script , which files
should I configure on the new server in order to set the correct
different IP ?
many many thanks !
QMail will automatically use the new IP address. The only config files
you'd need to modify would be things like the 'me' file if you defined
the IP in there instead of the hostname.
And you'll of course need to change your DNS MX record if it's the
public IP that changed. If it's an internal, you'd need to modify your
internal DNS MX record to point to the new machine.
I have thought about setting up a backup server for emergencies. But
rather than doing it the way you are considering I was going to do it by
rsync'ing all of the directories that get used then just having a script
that watches the primary machine and changes the IP on the backup box if
the primary fails.
As far as keeping them synchronized, something like this should work
(assuming that you have ssh set up and running on the standard port with
the proper keys in place)
/usr/bin/rsync -avzog --delete -e ssh mainmachine:/etc/mail /etc/
/usr/bin/rsync -avzog --delete -e ssh mainmachine:/var/lib/mysql /var/lib/
/usr/bin/rsync -avzog --delete -e ssh mainmachine:/home/vpopmail /home/
/usr/bin/rsync -avzog --delete -e ssh mainmachine:/var/qmail /var/
Did I forget any?
You might want /var/log/qmail, but that gets large quickly.
Run that script once to get it all in place, then put it into a cron job
to run every few minutes. That will keep the server in sync with the
main one, so all you will need to do is put this server intoplace and it
should take over without any problems.
---------------------------------------------------------------------
QmailToaster hosted by: VR Hosted <http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]