<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Start of mirror.htm --><!-- delayed after doctype-->
<html>
<head>
<link rel="stylesheet" type="text/css" href="../../css2/netwin.css">
	<script type="text/javascript" src="template/js2/netwin.js"></script>
<!--
	<script type="text/javascript" src="template/js2/dbg.js"></script>
-->

<!--
	<link rel="stylesheet" type="text/css" href="template/css2/netwin.css">

	<link rel="stylesheet" type="text/css" href="template/css2/test.css">
	<link rel="stylesheet" type="text/css" href="template/css2/sw.css">
	<link id ="cnr_css" rel="stylesheet" type="text/css" href="template/css2/cnr4.css">
-->

<!--[if lt IE 7]>
	<link rel="stylesheet" href="template/css2/ie6.css" type="text/css" />
<![endif]-->


<!-- Back to mirror.htm -->

<!-- #BeginEditable "Headerstuff"-->
<title>Mirroring the Server</title>
<META NAME="keywords" CONTENT="">
<META NAME="description" CONTENT="">
<meta http-equiv="Content-Type" content="text/html;">


<!-- #EndEditable -->
</head>
<body class="s_body">


<div id="width_limit_div" class="width_limit" style="padding-bottom:0;">

<!-- HEADER CONTENT -->
<div class="header">
  <div class="search_box"><table valign="center" cellSpacing="0" cellPadding="0" border="0">
	<form id="form1" name="form1" method="GET" action="http://www.google.com/custom">

	  <input type=hidden name=domains id=search_domains value="netwinsite.com">
	  <input type=hidden name=sitesearch id=search_sitesearch value="netwinsite.com">
	  <input type=hidden name=cof VALUE="LW:135;L:http://www.netwinsite.com/img2/logo_med_onwhite.png;LH:44;AH:center;S:http://www.netwinsite.com;AWFID:773914251fd85055;">

	  <tr valign="center">
		<td valign="center" style="padding-right:5px;"><span id="search_description" style="font-family:Verdana,Arial,Helvetica; font-size:9pt; ">Search website:</span>
		</td>
		<td valign="center">
			<input size="15" maxLength="80" name="q" style="font-family: Tahoma, Arial; font-size: 8pt">
		</td>
		<td valign="center">
			<input TYPE="image" src="template/img2/search.gif" alt="Search Netwinsite.com!" Name="I1" style="width:17px;height:17px;margin-left:5px;border:0;">
		</td>
	  </tr>
	</form>
  </table></div>

  <div class="page_logo"><table valign="center" border="0" cellpadding="0" cellspacing="10" >
	  <tr>
		<td style="padding-left:20px;">
		  <a href=""><img border="0" src="template/img2/logo_med_onwhite.png" height="44px" vspace="5" id="main_logo"> </a>
		</td>
		<td>
		  <div style="padding-top:14px;">
			<span class="s_header_text">Advanced Server Software<span>
		  </div>
		</td>
	  </tr>
  </table></div>
</div>

<!-- MENU CONTENT -->
<div class="bar_padding" onmousemove="stopEvent(event);return false;">
	<div class="bar" style="text-align:center">
		<table id="page_menu" class="t menu" onmousemove="menu_handler(event);" style="margin:auto"><tr>
	<td valign=top><table class="top_item" mid="menu_home"><tr><td class="btn_l"><td class="btn_c"><a href="http://netwinsite.com/index.htm" class="pad">Home</a><td class="btn_r"></table>
	<td valign=top><table class="top_item" mid="menu_products"><tr><td class="btn_l"><td class="btn_c"><a href="http://netwinsite.com/products.htm" class="pad">Products</a><td class="btn_r"></table>
	<td valign=top><table class="top_item" mid="menu_download"><tr><td class="btn_l"><td class="btn_c"><a href="http://netwinsite.com/download.htm" class="pad">Download</a><td class="btn_r"></table>
	<td valign=top><table class="top_item" mid="menu_buy"><tr><td class="btn_l"><td class="btn_c"><a href="http://netwinsite.com/prices.htm" class="pad">Buy&nbsp;Now</a><td class="btn_r"></table>
	<td valign=top><table class="top_item" mid="menu_support"><tr><td class="btn_l"><td class="btn_c"><a href="http://netwinsite.com/support.htm" onmouseup="x()" class="pad">Support</a><td class="btn_r"></table>
	<td valign=top><table class="top_item" mid="menu_company"><tr><td class="btn_l"><td class="btn_c"><a href="http://netwinsite.com/company.htm" onmouseup="x()" class="pad">Company</a><td class="btn_r"></table>
		</table>
	</div>

	<div id="menu_home" class="xmenu hidden" onmouseup="menu_hide_ex(event,'menu_home')" onmouseout="menu_action_mouseout(event,'menu_home')" onmouseover="menu_action_mouseover(event,'menu_home')" style="width:220px; display:none;">
	</div>

	<div id="menu_products" class="xmenu hidden" onmouseup="menu_hide_ex(event,'menu_products')" onmouseout="menu_action_mouseout(event,'menu_products')" onmouseover="menu_action_mouseover(event,'menu_products')" style="width:220px;">
		<a href="http://netwinsite.com/surgemail/" class="menu_row pad2"><div class="menu_icon_surgemail"></div>
			SurgeMail<span class="menu_extra"></span><br><span class="menu_info">Fully featured email server </span></a>
		<a href="http://netwinsite.com/surgeftp/" onmouseup="x()" class="menu_row pad2 divider"><div class="menu_icon_surgeftp"></div>
			SurgeFTP<span class="menu_extra"></span><br><span class="menu_info">High performance FTP server </span></a>
		<a href="http://netwinsite.com/dbabble/index.html" onmouseup="x()" class="menu_row pad2"><div class="menu_icon_dbabble"></div>
			DBabble <span class="menu_extra"></span><br><span class="menu_info">Instant messenging server </span></a>
		<a href="http://netwinsite.com/surgeweb/" onmouseup="x()" class="menu_row pad2 divider"><div class="menu_icon_surgeweb"></div>
			SurgeWeb<br><span class="menu_info">Modern Ajax web email client</span></a>
		<a href="http://netwinsite.com/products.htm" onmouseup="x()" class="menu_row divider">
			All products...</a>
	</div>

	<div id="menu_download" class="xmenu hidden" onmouseup="menu_hide_ex(event,'menu_download')" onmouseout="menu_action_mouseout(event,'menu_download')" onmouseover="menu_action_mouseover(event,'menu_download')" style="width:220px">
		<a href="/cgi-bin/keycgi.exe?cmd=download&product=surgemail&" onmouseup="x()" class="menu_row"><div class="menu_icon_surgemail"></div>
			Surgemail<span class="menu_extra"></span></a>
		<a href="/cgi-bin/keycgi.exe?cmd=download&product=surgeftp&" onmouseup="x()" class="menu_row"><div class="menu_icon_surgeftp"></div>
			SurgeFTP<span class="menu_extra"></span></a>
		<a href="http://netwinsite.com/dbabble/download.htm" onmouseup="x()" class="menu_row"><div class="menu_icon_dbabble"></div>
			DBabble <span class="menu_extra"></span></a>
		<a href="/cgi-bin/keycgi.exe?cmd=download&product=surgemail&" onmouseup="x()" class="menu_row divider"><div class="menu_icon_surgeweb"></div>
			SurgeWeb</a>
		<a href="http://netwinsite.com/surgemail/help/install.htm" onmouseup="x()" class="menu_row">
			Installing Surgemail</a>
		<a href="http://netwinsite.com/download.htm" onmouseup="x()" class="menu_row">
			Download any product...</a>
	</div>

	<div id="menu_buy" class="xmenu hidden" onmouseup="menu_hide_ex(event,'menu_buy')" onmouseout="menu_action_mouseout(event,'menu_buy')" onmouseover="menu_action_mouseover(event,'menu_buy')" style="width:220px">
		<a href="http://netwinsite.com/prices.htm" onmouseup="x()" class="menu_row divider">
			Pricing</a>
		<a href="http://netwinsite.com/https://netwinsite.com/cgi-bin/keycgi.exe?cmd=buy_new&product=surgemail" onmouseup="x()" class="menu_row"><div class="menu_icon_surgemail"></div>
			Surgemail<span class="menu_extra"></span></a>
		<a href="http://netwinsite.com/https://netwinsite.com/cgi-bin/keycgi.exe?cmd=buy_new&product=surgeftp" onmouseup="x()" class="menu_row"><div class="menu_icon_surgeftp"></div>
			SurgeFTP<span class="menu_extra"></span></a>
		<a href="http://netwinsite.com/https://netwinsite.com/cgi-bin/keycgi.exe?cmd=buy_new&product=dbabble" onmouseup="x()" class="menu_row"><div class="menu_icon_dbabble"></div>
			DBabble <span class="menu_extra"></span></a>
		<a href="http://netwinsite.com/https://netwinsite.com/cgi-bin/keycgi.exe?cmd=buy_new&product=surgemail" onmouseup="x()" class="menu_row divider"><div class="menu_icon_surgeweb"></div>
			SurgeWeb</a>
		<a href="http://netwinsite.com/activate.htm" onmouseup="x()" class="menu_row">
			Activation guide</a>
		<a href="http://netwinsite.com/prices.htm" onmouseup="x()" class="menu_row">
			Purchase any product...</a>
	</div>

	<div id="menu_support" class="xmenu hidden" onmouseup="menu_hide_ex(event,'menu_support')" onmouseout="menu_action_mouseout(event,'menu_support')" onmouseover="menu_action_mouseover(event,'menu_support')" style="width:220px">
		<a href="http://netwinsite.com/documentation.htm" onmouseup="x()" class="menu_row divider">
			Online documentation<span class="menu_extra"></span></a>
		<a href="http://netwinsite.com/surgemail/post.htm" onmouseup="x()" class="menu_row">
			Contact support<span class="menu_extra"></span></a>
		<a href="http://netwinsite.com/support.htm#email_list" onmouseup="x()" class="menu_row">
			Standard email support<span class="menu_extra"></span></a>
		<a href="http://netwinsite.com/http://news.netwinsite.com:8119/webnews?group=netwin.surgemail&cmd=list" onmouseup="x()"  class="menu_row divider">
			Community forum <span class="menu_extra"></span></a>
		<a href="http://netwinsite.com/support.htm" onmouseup="x()" class="menu_row">
			Support overview...</a>
	</div>

	<div id="menu_company" class="xmenu hidden" onmouseup="menu_hide_ex(event,'menu_company')" onmouseout="menu_action_mouseout(event,'menu_company')" onmouseover="menu_action_mouseover(event,'menu_company')" style="width:220px">
		<a href="http://netwinsite.com/company.htm" onmouseup="x()" class="menu_row">
			About us<span class="menu_extra"></span></a>
		<a href="http://netwinsite.com/surgemail/customers.htm" onmouseup="x()" class="menu_row">
			Customers<span class="menu_extra"></span></a>
		<a href="http://netwinsite.com/support.htm#sales_questions" onmouseup="x()" class="menu_row divider">
			Contact us</a>
	</div>
	<div style="background:url(template/img2/white_small.png);height:8px;font-size:1px;"></div>
</div>
<!-- Back to mirror.htm -->
<div class="content_outer">


<!-- Back to mirror.htm -->
<div class="L2C2_column_left">
<!-- Back to mirror.htm -->
<div style="width:160px;">
  <div id="floating_index" class="floating_index nav-menu _document_index" style="width:160px;">
	<h2 class="menu_top">Help Index</h2>
	<ul class="level-0">

		<li class="group_hidden"><a href="#" onclick="index_toggle(event)">Getting Started</a><ul class="level-1">
			<li id="idx_surgemail.htm"><a href="surgemail.htm" target="_top">SurgeMail in a nutshell</a><ul class="level-2"></ul></li>
			<li id="idx_startingoff.htm"><a href="startingoff.htm" target="_top">Before you install</a><ul></ul></li>
			<li id="idx_install.htm"><a href="install.htm" target="_top">Installation &amp; Upgrading</a><ul></ul></li>
			<li id="idx_migration.htm"><a href="migration.htm" target="_top">Migration to SurgeMail</a><ul></ul></li>
			<li id="idx_updates.htm"><a href="updates.htm" target="_top">Change history</a><ul></ul></li>
			<li id="idx_postinstall.htm"><a href="postinstall.htm" target="_top">Post Installation</a><ul></ul></li>
			<li id="idx_faq.htm"><a href="faq.htm" target="_top">FAQ</a><ul></ul></li>
			<li id="idx_support.htm"><a href="support.htm" target="_top">Customer Support</a><ul></ul></li>
		</ul></li>

		<li class="group_hidden"><a href="#" onclick="index_toggle(event)">Anti Spam / Virus</a><ul class="level-1">
			<li id="idx_protected.htm"><a href="protected.htm#virusscanner">Virus Protection</a></li>
			<li id="idx_spam.htm"><a href="spam.htm">Spam Prevention</a></li>
			<li id="idx_protected.htm"><a href="protected.htm#mfilter">Mail Filtering</a> </li>
			<li id="idx_protected.htm"><a href="protected.htm#friends">Friendly Relations System</a></li>
			<li id="idx_rbl.htm"><a href="rbl.htm">Realtime Blackhole Lists</a></li>
		</ul></li>

		<li class="group_hidden"><a href="#" onclick="index_toggle(event)">Server Management </a><ul class="level-1">
			<li id="idx_status.htm"><a href="status.htm">Server Status</a></li>
			<li id="idx_log.htm"><a href="log.htm">Searching the log files</a></li>
			<li id="idx_report.htm"><a href="report.htm">Report generation</a></li>
			<li id="idx_accounts.htm"><a href="accounts.htm">Managing accounts</a></li>
			<li id="idx_tellmail.htm"><a href="tellmail.htm">Using the tellmail utility.</a></li>
		</ul></li>
		
		<li class="group_hidden"><a href="#" onclick="index_toggle(event)">SurgeMail Settings</a><ul class="level-1">
			<li id="idx_domain.htm"><a href="domain.htm">Domain specific settings</a></li>
			<li id="idx_global.htm"><a href="global.htm">Global settings</a></li>
			<li id="idx_webmail.htm"><a href="webmail.htm">WebMail settings</a></li>
		</ul></li>

		<li class="group_hidden"><a href="#" onclick="index_toggle(event)">Configuration Guides</a><ul class="level-1">
			<li id="idx_authent.htm"><a href="authent.htm">Authentication  Modules</a></li>
			<li id="idx_domains.htm"><a href="domains.htm">Virtual  Domains</a></li>
			<li id="idx_clustering.htm"><a href="clustering.htm">Clustering</a></li>
			<li id="idx_mirror.htm"><a href="mirror.htm">Mirror the server</a></li>
			<li id="idx_scalable.htm"><a href="scalable.htm">Performance &amp; Scalability</a></li>
			<li id="idx_lookandfeel.htm"><a href="lookandfeel.htm">Custom look and feel</a></li>
			<li id="idx_internal_email.htm"><a href="internal_email.htm">Custom internal emails </a></li>
			<li id="idx_language.htm"><a href="language.htm">Language translation</a></li>
			<li id="idx_redirection.htm"><a href="redirection.htm">Mail Redirection</a></li>
			<li id="idx_surgewall.htm"><a href="surgewall.htm">SurgeWall</a></li>
			<li id="idx_sms.htm"><a href="sms.htm">SMS</a></li>
			<li id="idx_lists.htm"><a href="lists.htm">Mailing lists and bulletins</a></li>
			<li id="idx_secure.htm"><a href="secure.htm">Securing the server</a></li>
			<li id="idx_webdav.htm"><a href="webdav.htm">WebDav</a></li>
			<li id="idx_incoming.htm"><a href="incoming.htm">Incoming MX servers</a></li>
			<li id="idx_load_balance.htm"><a href="load_balance.htm">Load balancing</a></li>
			<li id="idx_ndb.htm"><a href="ndb.htm">NDB NetWin folder format</a></li>
			<li id="idx_domainkeys.htm"><a href="domainkeys.htm">DomainKeys Support</a></li>
			<li id="idx_ipv6.htm"><a href="ipv6.htm">IPV6 Support</a></li>
			<li id="idx_amazon-ses.htm"><a href="amazon-ses.htm">Amazon-SES gateway</a></li>
			<li id="idx_examples.htm"><a href="examples.htm">Example configurations</a></li>
		</ul></li>
	</ul>
  </div>
  &nbsp;	<!-- required to render div -->
</div>
<script>window.do_scroll_menu=false</script>
<!-- Back to mirror.htm -->
</div>

<!-- Back to mirror.htm -->
<div class="L2C2_column_content">
<!-- Back to mirror.htm -->
<!-- #BeginEditable "Body" --> 
<script language="JavaScript"> search_details('Search SurgeMail Manual:','http://netwinsite.com/surgemail/help'); </script>
<script language="JavaScript"> display_crumbs_doc(['Home','Documentation','SurgeMail Help Index','Mirrorring FAQ'],3); </script>
<script language="JavaScript"> index_select('idx_mirror.htm'); </script>
<h1>Mirroring (Server Replication) FAQ</h1>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="#remote_host">What 
    is mirroring</a></font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="#should">Should 
    I be setting up mirroring in my environment or is it a bad idea?</a></font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="#on">How 
    do I turn it on ?</a></font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="#balance">Do 
    not load balance mirrored servers</a></font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="#config">Can 
    I mirror the config file as well ? </a></font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="#adding">Adding 
    a mirror to an existing system</a></font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="#master">What's 
    the deal with master/slave, can I swap them over? </a></font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="#sync">How 
    do I know it is working? Is it in sync yet ? Is it keeping up ? </a></font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="#long">How 
    long can I expect mirroring actions to take in a real environment (100 user 
    + 1GB mail / 5000 user + 50GB mail / 100000 user + 500GB mail)</a><br>
    </font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="#crash">What 
    happens if I stop surgemail / surgemail crashes / change my mirroring configuration 
    etc. halfway through some of these mirroring actions.</a></font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="#competing">If 
    mirroring is really such a good idea why do none of the competing products 
    offer this capability.</a></font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="#two">I 
    have two live mail system that I would like to mirror each other. Can I and 
    / how do I configure this? </a></font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="#always">Can 
    I check it's always working</a></font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="#notmirrored">Is 
    there any functionality / settings etc. that are not mirrored?</a></font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="#performance">Performance</a></font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="#swap">How 
    to swap master/slave when one system dies or is replaced...</a></font></li>
</ul>
<h3><a NAME="remote_host"></a>Mirroring the server - What is mirroring.</h3>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The SurgeMail 'Mirror' 
  system allows you to link two systems together and read or deliver Email to 
  either system and both systems will continually 'match' each other. This can 
  be used in several ways:</font> </p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Keep a live 
    backup system for 'hot swapping' in case of failure or upgrade requirements 
    on your live system.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Move a system 
    from one geographic location to another with no downtime</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Mirroring will 
  work over a LAN or WAN connection and can be encrypted. Unlike using shared 
  NFS drives there is no single point of failure in a SurgeMail Mirrored system 
  so you have genuine fail over capability.</font></p>
<p>&nbsp;</p>
<h3><a name="should"></a>Should I be setting up mirroring in my environment or 
  is it a bad idea?</h3>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In almost all cases, 
  you should be running a mirror of your mail server, it's the cheapest and most 
  efficient way to keep a live backup of your system. The only cases we can think 
  of where you don't need a mirror are if:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You are running 
    a home system, and you don't mind if you loose your mail folders.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You have a working 
    daily backup of your mail store, and you are happy to lose up to 24 hours 
    of email when your disk fails.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You are running 
    a free service and you have warned your customers that the service may vanish 
    'at any time'</font></li>
</ul>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Some people forget 
  that disk drives fail, they do, your mail server's disk will fail approximately 
  once in the next 2-3 years. Some people think RAID 5 or similar systems provides 
  protection from disk failure, it does not, we've had so many customers loose 
  Raid 5 arrays (and we've lost so many) that we actually consider them less reliable 
  than non raid5 disk arrays. (Speaking of which always use RAID 10 for high performance 
  and reliability for a mail server, when possible, NOT Raid 5)</font></p>
<h3><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Do not LOAD BALANCE 
  mirrored servers<a name="balance"></a></font></h3>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Many people think 
  mirroring should be combined with a load balancer as you would do with a web 
  server, this is NOT the case. A simple load balancer causes serious risks when 
  used with mirroring because if the mirroring fails even briefly, and the user 
  accesses both of the servers during that time, the new messages could be assigned 
  identical UID values. Then one of those messages will be invisible and lost 
  to the end user. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">To avoid this and 
  still have a fault redundant system you can</font><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> 
  do any of the following</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Only deliver 
    new mail to one host.</font></li>
  <li>or Only failover rather than load balance</li>
  <li>or Make the load balancer balance on incoming ip address when it can so 
    it doesn't randomly move users between hosts.</li>
</ul>
<h3>Authent modules that support mirroring.</h3>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In general nwauth 
  is the only module that natively supports mirroring, but some other modules 
  work where they can both access a common back end server (like mysql, ldap etc) 
  ntauth doesn't work because it relies on some local files to fill in fields 
  that are not available in the windows database. </font></p>
<blockquote> 
  <table class="plain_table" width="694" border="0" cellspacing="1" cellpadding="1">
    <tr> 
      <th><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Module</b></font> 
      <th><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Support?</b></font> 
    </tr>
    <tr> 
      <td><font face="Verdana, Arial, Helvetica, sans-serif" size="2">nwauth</font></td>
      <td><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Yes</font></td>
    </tr>
    <tr> 
      <td><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> ntauth</font></td>
      <td><font face="Verdana, Arial, Helvetica, sans-serif" size="2">No</font></td>
    </tr>
    <tr> 
      <td><font face="Verdana, Arial, Helvetica, sans-serif" size="2">mysqlauth</font></td>
      <td><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Yes but 
        both servers must point to the same mysql database backend </font></td>
    </tr>
    <tr> 
      <td><font face="Verdana, Arial, Helvetica, sans-serif" size="2">ldapauth</font></td>
      <td><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Yes again 
        both servers must point to the same ldap back end typically</font></td>
    </tr>
  </table>
</blockquote>
<h3><a name="on"></a>How do I turn it on?</h3>
<p><font face="Verdana, Arial, Helvetica, sans-serif">In brief:</font></p>
<p>
<ol>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Copy surgemail.ini 
    to the slave systetm and adjust any system specific settings.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Turn on the 
    mirror settings on both servers, set mode to &quot;master&quot; on the master, 
    and 'slave&quot; on the second system.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you are mirroring 
    configuration then issue tellmail resync_config on master system</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Then issue tellmail 
    resync_fast on master system.</font></li>
</ol>
<p></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If you want to 
  add mirroring to an existing server, you'll need to read <a href="#adding">this</a>.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Simply setup two 
  mail servers in a similar manner, we recommend you copy the config from one 
  to the other and then adjust any system specific settings (mail paths etc.) 
  it's important that the configs have the same domains and forward rules and 
  the same g_mirror_secret)</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Example: (adding 
  these settings to surgemail.ini) </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Server 1: ip 10.0.0.1 
  (master)</font></p>
<blockquote> 
  <pre><a href="global.htm#g_mirror_nossl">g_mirror_nossl</a> &quot;TRUE&quot;
<a href="global.htm#g_mirror_mode">g_mirror_mode</a> &quot;master&quot;
<a href="global.htm#g_mirror_host">g_mirror_host</a> &quot;10.0.0.2&quot;
<a href="global.htm#g_mirror_secret">g_mirror_secret</a> &quot;testing&quot;
<a href="global.htm#g_mirror_config">g_mirror_config</a> &quot;true&quot; <font class="normal">(if you want to mirror config changes as well)</font>
</pre>
</blockquote>
<p></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">server 2: ip 10.0.0.2 
  (slave) </font></p>
<blockquote> 
  <pre><a href="global.htm#g_mirror_nossl">g_mirror_nossl</a> &quot;TRUE&quot;
<a href="global.htm#g_mirror_mode">g_mirror_mode</a> &quot;slave&quot;
<a href="global.htm#g_mirror_host">g_mirror_host</a> &quot;10.0.0.1&quot;
<a href="global.htm#g_mirror_secret">g_mirror_secret</a> &quot;testing&quot;
<a href="global.htm#g_mirror_config">g_mirror_config</a> &quot;true&quot; <font class="normal">(if you want to mirror config changes as well)</font>
</pre>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">So above are the 
  settings that go into each servers surgemail.ini. That will give you a mirror, 
  its that simple. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Now you need to 
  consider how users get to the server and how you can easily allow them to get 
  to the 'working' server in the event of a failure.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">For incoming messages 
  you can just setup 'MX' records so that the backup server is listed as a low 
  priority host. e.g.:</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"> your.domain MX=10 
  mail.your.domain<br>
  your.domain MX=20 mail2.your.domain</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">But for user access 
  to the server you have several options:</font></p>
<ol>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Tell users to 
    use 'mail2.your.domain' in the event of a failure (suitable for office mail 
    servers)</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Manually change 
    the IP number of the systems in the event of a catastrophic failure.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Invent an 'extra' 
    IP number for the mail server and assign it to the 'working' box. Then manually 
    add that iIP number to the other system during a failure of the main system.</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Use system 3, 
    but then use some scripts to automatically change the IP number during failures 
    (not recommended) <a href="failover.htm">See here for details</a></font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Use system 3 
    but then use a router that can do the failover on the fly for you. (expensive 
    but reliable)</font></li>
</ol>
<h3><a name="config"></a>Using config setting mirroring (Requires SurgeMail 3.1 
  or later)</h3>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You can choose 
  to enable config setting mirroring. This causes SurgeMail to send it's config 
  from master to slave and vice-versa if/when config changes are made in the web 
  interface (it does not notice manual changes done by editing the config file). 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">First make a backup 
  of both ini files, just in case :-)</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">To enable it set:</font></p>
<blockquote> 
  <pre><a href="global.htm#g_mirror_config_except">g_mirror_config</a> &quot;TRUE&quot;</pre>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">on both machines, 
  then execute:</font></p>
<blockquote> 
  <pre>tellmail resync_config</pre>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">on the machine 
  which has the desired config.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Of course, you 
  do not always want to mirror all the settings, especially settings to handle 
  mirroring like g_mirror_host for example. You may use <a href="global.htm#g_mirror_config_except">g_mirror_config_except</a> 
  specify settings to <i>be ignored when processing an incoming config, </i>in 
  addition there are a number of settings which are ignored by default, see <a href="global.htm#g_mirror_config_except">g_mirror_config_except</a> 
  for details.</font></p>
<h3><a name="adding"></a>Adding a mirror to an existing system</h3>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You need to install 
  surgemail on a new system, then follow the instructions above in &quot;<a href="#on">How 
  do I turn it on?</a>&quot; to add the correct mirror settings to both ini files 
  (old system and new system), you should set the new system up as SLAVE, then...</font></p>
<blockquote> 
  <pre>issue &quot;tellmail resync_config&quot; on master <font class="normal">(if using <a href="#config">g_mirror_config</a>)</font>
issue &quot;tellmail surgehost_update&quot; on master
issue &quot;tellmail resync_nwauth&quot;' on master <font class="normal">(if using nwauth)</font>
issue &quot;tellmail resync_fast&quot; on master</pre>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Note: Although 
  this feature exists in earlier versions of surgemail, we recommend upgrading 
  to 3.1 before using it as we made significant improvements to the fault tolerance 
  of this feature (it's more idiot proof in version 3.1 :-)</font></p>
<h3><a NAME="sync"></a>How do I know it is working? Is it in sync yet ? Is it 
  keeping up ? </h3>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Always check in 
  two ways, first check the status as below, then compare two directories manually 
  to be 'absolutely' sure.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">In the status window 
  (near the end) you will see the following information</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Mirror out: Que/sent 
  add=612/611 (3343432 bytes) del=612/610&nbsp;&nbsp;&nbsp;<br>
  <br>
  Mirror&nbsp; in: Received add=0 del=0 rename=0 failed=0</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">This shows both 
  halves of the mirroring operation. The "Mirror out:" line shows messages queued 
  to be sent to the other system and the second number (/611) shows how many have 
  been successfully sent (so one is still queued) and how many delete operations 
  have been queued (612) and how many have been sent (/610), so 2 are still queued.&nbsp; 
  Obviously these numbers should normally match.</font> </p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The second line, 
  "Mirror in:" shows how many new items or deletions have arrived from the other 
  system.</font> </p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">To compare directories 
  do this on both servers, and compare the directory listings:</font></p>
<blockquote> 
  <pre>tellmail path user@domain.name
dir [path it returns]/mdir/new</pre>
</blockquote>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Lastly, issue a 
  'tellmail resync_fast' and check in the status to see how many corrections it 
  needs to send.</font></p>
<h3><a name="master"></a>What's the deal with master/slave, can I swap them over? 
</h3>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">For internal reasons 
  we needed to establish a master/slave concept, although in almost all respects 
  they are identical and neither is the 'master' in any behavioral sense, for 
  example if you change something on the slave the change will appear on the master 
  and versa visa. The one thing you should never do is swap the master/slave settings 
  over as this will confuse the mirroring software! (It can be done reasonably 
  safely if both servers are stopped at the time, but it's best avoided :-)</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">We do recommend 
  that you generally avoid doing things on both servers randomly, it's best to 
  make everything go through one server and do all changes etc. on one server, 
  then use the other server purely as a 'hot' backup. In this way if something 
  does go wrong, but goes unnoticed (e.g. they get unplugged from each other) 
  you will know which one is in a 'good' state and which one is 'out of date' 
  </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Note: DLIST runs 
  only on the 'master', so in the situation where your master is going to be down 
  for several days, you will need to swap master and slave so that the dlist on 
  the 'slave' will come to life.</font></p>
<h3><a name="long"></a>How long can I expect mirroring actions to take in a real 
  environment (100 user + 1GB mail / 5000 user + 50GB mail )</h3>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">How long is a piece 
  of string :-), the time is mainly dependent on the 'number' of messages stored 
  on the server, so it is not directly related to the number of users, or the 
  size of your mail store. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">But as a rough 
  guide, to resync from scratch, you would expect it to take something like:</font></p>
<ul>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">10 minutes for 
    100 users first time, 1 minute to resync</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">3 hours for 
    1000 users first time, 4 minutes to resync</font></li>
  <li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">3 days for 40,000 
    users first time, 3-4 hours to resync.</font></li>
</ul>
<h3><a name="crash"></a>What happens if I stop surgemail / surgemail crashes / 
  change my mirroring configuration etc. halfway through...</h3>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The mirroring is 
  very forgiving, it will try to continue after a crash, when one server is down 
  changes are 'queued' until it reappears. The only time you must issue commands 
  is when one server's disk is lost/reformatted, then you must issue a 'tellmail 
  resync' on the 'good' system.</font></p>
<h3><a name="competing"></a>If mirroring is really such a good idea why do none 
  of the competing products offer this capability.</h3>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Mostly because 
  they can't, to implement mirroring it's essential to integrate it into the core 
  mail server code at the design stage so they are too far down the path to add 
  it. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Most other suppliers 
  offer one of two alternatives instead, they either provide 'file system' level 
  mirroring, which at best is much less efficient, and likely to be minutes or 
  hours 'out of date'. Or they promote the 'shared network drive' approach even 
  though this clearly fails to duplicate the 'data' and thus is completely ineffective 
  as a fault redundant solution.</font></p>
<h3><a name="two"></a>I have two live mail system that I would like to mirror 
  each other. Can I and / how do I configure this? </h3>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Assuming these 
  systems currently run different domains, yes you can, you first add the other 
  domains to each of the servers, and then turn on the mirroring settings. Then 
  issue a tellmail resync on 'both' of the servers so that each one sends the 
  new domains to the 'other' system.</font></p>
<h3><a name="always"></a>Can I check it's always working?</h3>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The best test is 
  to send an email to one system, then read it from the other, you can setup our 
  '<a href="http://netwinsite.com/watchdog">watchdog</a>' utility to do this automatically 
  once an hour so that you will always know if anything goes wrong. </font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">You can also check 
  the mirror section of the 'status' page, here the cryptic errors are often not 
  that important, the key thing to look for is the counters showing successfully 
  mirrored items, are these counters ticking over. </font></p>
<h3><a name="notmirrored"></a>Is there any functionality / settings etc. that 
  are not mirror?</h3>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The best answer 
  we can give here is 'probably'. :-). We've tried to identify everything, but 
  there may be things we've missed. In particular if you add settings to your 
  config file which refer to files that are non standard then those files may 
  not get mirrored. (And alias file setting for a domain would be one example).</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">DLIST currently 
  only runs on 'one' of the servers (the master), this is to avoid problems of 
  mailing list messages being sent twice by mistake :-), It's files are mirrored 
  though so the data is duplicated.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">The user database 
  is not mirrored unless you are using NWAUTH and you turn on the setting. If 
  you are using some other user database then you will need to consider if it 
  needs mirroring in some way. Usually in this situation it won't be an issue 
  as it will be a network accessed database anyway.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Please also note 
  that the config mirroring is new and requires SurgeMail 3.1 or later for best 
  results.</font></p>
<h3><a name="performance"></a>Any Performance Impact?</h3>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">There is of course 
  some and the data does need to be sent between the two systems. However, the 
  load is by no means doubled, as the mirroring occurs at the delivery stage after 
  much pre-processing has occurred (e.g.: spam &amp; virus filtering). Also most 
  mail servers will run at about 98% idle so the extra load is really of no relevance 
  (even for quite large ISP operations).&nbsp; We run mirroring on the servers 
  we host with 40,000 plus users on a system. So far we've had about 3 Raid/system 
  failures on our own hosting systems where mirroring has 'saved the day' and 
  resulted in no significant loss of data. </font></p>
<p>&nbsp;</p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>You can mirror 
  over a WAN</b> connection, but the round trip time may slow down the mirroring 
  a bit so if the system is very heavily used it may struggle to keep in sync. 
  On most systems this is not a problem. But on very large busy systems this would 
  be a mistake.</font></p>
<h3><a name="swap"></a>Swap Master/Slave when a system dies or is replaced.</h3>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">For short periods 
  there is no need to swap master/slave. The only thing that doesn't function 
  on the slave is mailing lists.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">If the master is 
  dead or is being replaced but it may take a week then you may choose to swap 
  them, do it like this:</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">1) Stop both servers.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">2) Change the g_mirror_mode 
  setting from &quot;slave&quot; to &quot;master&quot;</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">3) If needed change/swap 
  ip addresses for the servers.</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">4) start the new 
  master server (which was the slave)</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">5) When the old 
  master server is repaired be sure to set it's g_mirror_mode to &quot;slave&quot; 
  before starting it!!!</font></p>
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">6) Issue a 'resync_config' 
  and 'resync' on the MASTER (which was the slave) once the new 'slave' is running. 
  </font></p>
<p>&nbsp;</p>
<!-- #EndEditable --> 
<!-- CONTENT END -->
</div>

<!-- Back to mirror.htm -->
</div>

<!-- Back to mirror.htm -->
<div class="prefooter">&nbsp;</div>
<div id="footer" class="footer">
 <table align="center" CELLPADDING="0" CELLSPACING="0" WIDTH="900" HEIGHT="100" BORDER="0" >
  <tr>
    <td HEIGHT="100%" >
      <p align="center" style="margin-top: 8pt; margin-bottom: 2pt; margin-left: 8pt">
  	  <a href="http://netwinsite.com/sitemap.htm" class="footer_link">Site Map</a><span class="style2"> | </span>
  	      <a href="http://netwinsite.com/index.htm" class="footer_link">Home</a><span class="style2"> | </span>
	      <a href="http://netwinsite.com/products.htm" class="footer_link">Products</a><span class="style2"> | </span>
	      <a href="http://netwinsite.com/surgemail/post.htm" class="footer_link">Contact Netwin</a><span class="style2"> | </span>
	      <a href="http://netwinsite.com/company.htm" class="footer_link">Company</a><span class="style2"> | </span>
	      <a href="http://netwinsite.com/license_all.htm" class="footer_link">Licensing</a><span class="style2"> | </span>
	      <a href="http://netwinsite.com/links.htm" class="footer_link">Links</a><span class="style2">  </span>
		<br>
		<a href="/surgemail/" class="footer_link">Windows Mail Server Software</a><span class="style2"> |  </span> 
		<a href="/webmail/" class="footer_link">Linux Webmail</a><span class="style2"> | </span> 
		<a href="/surgemail/free_mail_server.htm" class="footer_link">Free Windows Mail Server</a>

        <table align=center width="370" border="0" style="margin-bottom: 2pt">
        <tr>
          <td width="32"><img src="template/img2/logo_small_ongray.png" height="25" hspace="1" vspace="1" align="bottom"></td>
          <td width="350"><p class="smaller" style="margin-top: 14pt;">Copyright &copy; 2011 Netwin Ltd. All rights reserved.
		  </td>
        </tr>
      </table>
	</td>
  </tr>
</table>
</div>
</div>

<br><br>
</body>

<!-- Back to mirror.htm -->
</body>
</html>

<!-- End of mirror.htm -->

