netforce said:
a) To synchronize the webcontent and the MySQL databases of the primary and the secondary system once per day. (Thus to have the data transfered from the primary to the secondary one).
This is not a simple thing to implement.
Here are some directions to look in...
You can use a MySQL cluster to keep databases on multiple servers in sync. You can use rsync or tar to copy files between servers.
b) Both servers should be able to receive e-mail for our clients, since some of them, have no chance of loosing any important mail.
You cannot send mail to both servers; you can let the sending servers decide which one to use by having two MX records; one for each machine, with the same priority number, so both machines will get mail, or you can have just one MX record, to the main machine, and change DNS if/when that machine fails.
c) Somehow the clients should be able to receive incoming mail from both machines to their local computer, preferably without so much frustration.
If you use two MX records (above) then each user will need to read email from both servers all the time, and they'll have to run clients which won't cause local errors if one of the servers won't reach. For that reason you might want to use the single MX method, even though it could result in undeliverable and/or delayed email under circumstances.
d) The backup machine, won't have so many IPs available, thus a few clients won't be able to run their SSL site in there, as long as the primary system is down, but anyway, thus won't hurt too much. In the near future we may add more IPs to the second machine, in order to short this problem out.
Then don't even put regular content into the private_html directories, but rather a placeholder that says something like "secure site temporarily down; try again later".
Now what I need from you is some instructions. Since in both machines I would have root access, I suppose any DNS tricks, which you are going to advice, there won't be a problem
Use a very low TTL, perhaps 300 to 600 (5 to ten minutes). Run both machines as nameservers. Run a script on the backup machine that keeps checking the heartbeat of the master machine, and that changes DNS records if the master fails.
Or alternatively, if the main machine fails, the heartbeat monitor can change the IP#s of the backup machine, and restart the network.
However, if you use the latter method you'll have two issues:
1) DA doesn't use the standard method for adding IP#s; you'll have to call the DA script as well as the OS script, for adding IP#s.
2) You won't be able to reach or restore the failed machine if all it's IP#s are now being served on the backup machine.
Jeff