IMPORTANT: PLEASE READ THESE NOTES **FULLY** BEFORE ENABLING FAILOVER

POSSIBLITY OF DATA LOSS:

With automatic failover your dns records will be changed to point to
another server (the designated WEB_SLAVE) when the primary server
(WEB_MASTER) is offline. THIS CAN LEAD TO DATA LOSS if you allow users
or their visitors to make changes on the alternate server (log-in via
ftp, log-in to a web application, post comments etc.)

You should have some means to prevent this happening or be prepared
to backup the slave server and merge the data on master and slave. 
Backup of the slave is not normally enabled and merging data is
likely to be non-trivial, so preventing login to the slave is advised.

POSSIBILITY OF E-MAIL LOSS:

CPanel (and probably other control panels) commonly configure the MX
record for each domain pointing to the main domain name. The standard
setup here will change the IP address for that main domain name and
so redirect e-mail as well as web traffic to the slave server. If you
have both servers set up to receive mail for the domain this may be
acceptable but if not you will most likely lose e-mail.

To overcome this you can either:
1. Change your MX record to point to a subdomain (typically
mail.example.com) and set up the corresponding A record (not CNAME)
to the IP address of your main server.
2. Remove the line starting DOMAIN. from each of the override files
(*.ov) in this directory. This requires that you access your web-site
with the www prefix - the domain name alone (without www) will not
failover.

ENABLING FAILOVER:

The files PREPARE.ov, FAILOVER.ov and RESTORE.ov dictate the dns
records that will be changed during failover and restore. PREPARE
shortens TTL but doesn't change over, FAILOVER changes to slave
server, keeping short TTL, RESTORE reverts back to main server and
standard (longer) TTL. These names derive from the actions set up
in the config - advanced configurations may use different names.

Each override file uses a format like this to define the dns
records it will change, and by default contains 2 lines to change
A records for the main domain name and the www subdomain:
DOMAIN.			900	IN	A	WEB_MASTER
www.DOMAIN.		900	IN	A	WEB_MASTER

If you have other subdomains you'd like to failover then edit all
.ov files and add new lines as required. Don't leave blank lines
in these files. As discussed above, you may also prefer to remove
the line starting DOMAIN. enabling failover only on the www
subdomain and any others you define.

Before enabling automatic failover you should test the failover
process manually using scripts/failover - check that the
zone file is changed correctly and is updated on your nameservers.
You should check your setup (with dig or using an online service
such as dnsreport.com) at each stage of the failover / restore process.

To enable automatic dns failover for this domain change the config
file in this directory to include the line:
FAILOVER_ENABLE='y'

and add this line to your main system config file (system/config):
FAILOVER_AUTO='y'
(this will override the setting in scripts/config)

FINAL WARNING: DON'T ENABLE THIS UNLESS YOU'RE ABSOLUTELY SURE
YOU KNOW WHAT YOU'RE DOING. THOROUGH TESTING ON AN UNIMPORTANT
DOMAIN IS HIGHLY RECOMMENDED!

Chris Cheers, 31 Aug 2007.
