MS Exchange

Table of contents
No headers

MS Exchange Backup  


When Amanda is configured and licensed for MS Exchange backup, Amanda uses the Microsoft Windows Volume Shadow Copy Service (VSS) to back up the Exchange database and logs. ZWC backs up and restores MS Exchange at Storage Group level. However, ZWC supports restoring individual stores as well.  

ZWC supports full and differential backup of Exchange. It takes a backup of Exchange databases, check point file and transaction logs.   

During a Level 0 (Full) backup, ZWC backs up all databases, transaction logs and checkpoint file. Transaction logs are truncated after a level 0 backup. The full backup includes *.edb (exchange database files), *.stm, E*chk and E*.log files from the database and transaction log directories.  

  • During Differential backups, ZWC will backup only the transaction logs i.e, backup of E*.log files from the transaction log directories. Transaction Logs are not truncated.  

Requirements for MS Exchange Backup  


These instructions assume you have already installed and licensed the Amanda server and the MS Exchange server being backed up. Because the Volume Shadow Copy Service (VSS) takes care of any necessary file locking and transaction log pruning during the backup process, the requirements are simple:  

  •  The Volume Shadow Copy Service must be enabled. Although the Volume Shadow Service is enabled by default, it may have been turned off after Windows installation. To ensure that it is running:  

1.              Right-click theMy Computericon and chooseManagefrom the popup menu.  

2.              Expand the Services and Applications tree and locate the Volume Shadow Copy Service.  

3.              If it is not started, do so.  

4.              If necessary, change the General Properties to make the Startup TypeAutomaticrather thanManual 


  • Run the commandvssadmin list writersat the Windows command prompt and check that the state of the Exchange Writer isstable. If not (or if there are any VSS errors), restart theMicrosoft Exchange Information Storeservice.  In case of Windows 2003 Small Business Server edition, the Exchange Writer is disabled by default. Please follow the instructions in this MS knowledgebase article to enable the Exchange Writer:  
  •  Microsoft .NET Framework 4.0 or greater must be installed on the Amanda client. For older releases (Exchange 2008 and earlier), .NET 3.5 Service Pack 1 is required.  
  •  Exchange circular logging must be disabled. If circular logging is enabled, the Exchange server client will only retain the last 5 transaction logs, which may not be sufficient to restore the most recent backup. Thisarticle provides information on how to disable circular logging in Exchange 2010.  
  • Powershell 2 is required on the Exchange server being backed up.  

Configuring MS Exchange Backups  


The Zmanda Client for Windows uses snapshots for Exchange server backups. The procedure described below only backs up the Exchange database and related data files. Other files (such as the Exchange installation directory) require separate configuration for backup.  

Creating a Backup Set for Exchange Servers in the ZMC  


Create a dedicated backup set for each MS Exchange server you intend to back up. On theSourcespage you are prompted to select what type of object you want to back up when you click on Add Source. ChooseApplications>MS Exchange, for more options:  


Host Name  

The name or IP address of the machine running the MS Exchange server you intend to back up.  

Data Deduplication  

Select the checkbox to enable deduplication. Note that user is not allowed to select any encryption and compression strategies if data deduplication is enabled.  


Select from the dropdown to enable these options if desired. They are described in more detail here 

Advanced Options  

Extended attributes are always backed up on Windows clients regardless of application. For details on other Advanced Options, see Backup Whatchapter.  

Backup Set  

Select backupset from dropdown menu to which DLE will be added upon saving.  

After you have set the options, clickSaveto add the MS Exchange object to the backup set. You can then configure the backup set just as you would do for any other source by setting the options onBackup Where,Backup How, andBackup When, etc.  

Please make sure no other backup software is scheduled to run on the Windows Client at the same time as the Amanda Exchange backup.  

Protecting all the MS Exchange Components  

 Servers running Exchange Server 2013 and 2016 use Active Directory extensively for the following:  

  • Active Directory is the configuration repository for Exchange organization data. Without this configuration information, Exchange servers cannot start or function.  
  • All Exchange directory information is stored in Active Directory. This includes configuration information for all mailboxes, contacts, distribution lists, servers, and sites within the Exchange organization.  
  • Items such as distribution lists, access permissions for users and groups are also stored within Active Directory.  

Because Exchange depends so heavily on Active Directory, it is crucial to back up the System State of an Exchange Server along with System State of the Domain Controller running in the Exchange environment, so that the Exchange configuration stored in the Active Directory also gets backed up.  

Requirements for MS Exchange Restore  


  •  The target Exchange server must have the same Windows OS version and Service Packs as the source server.  
  • The target Exchange version must be the same as the source server.  
  • The storage groups and databases must already exist on the target server, and must have the same names as the original storage groups or databases.  
  •  The target server must have the same Organization and Administrative Group name as the source server.  
  •  For Full restore, Dismount all the storage groups.  
  •  ZWC supports restoring individual databases (Stores). For each database that you want to restore, the associated storage group must be dismounted.  
  • Circular logging must be disabled.  
  • Make sure that theThis database can be overwritten by restoreoption is selected for the Stores being restored.  

Configuring MS Exchange Restores from the Zmanda Management Console  


In the event of a server loss, how you perform the recovery will depend on the server role and your disaster recovery plan. Server loss can be caused by software or hardware failure, or by the physical loss of the site where the server was housed. One would also need to recover Exchange databases in case of issues such as database corruption, loss of transaction logs, accidental deletion of mailboxes, etc. Exchange databases can be restored to the same server or to an alternate server depending on the Disaster Recovery plan decided by the Exchange Administrator.  

3 types of recovery operations are allowed by Microsoft Exchange:  

  • Roll-forward,  
  • Point in time  
  • Full restore  

The state of the MS Exchange server when the restore is started, determines what type of recovery will be available. Please seethis Microsoft documentationfor details on Exchange recoveries.  

Here are the steps to restore and recover Exchange using ZWC to the original server or a different server.  

Restoring to the Original Server:  


  1. Open Zmanda Management Console and go to theRestore Whatpage.  
  2. Enter the original Exchange Server details in theInitial Hostfield. If the backup set contains a single DLE for Exchange,msexchangeis pre-entered in theInitial Directoryfield. If the backup set contains more than one DLE, selectmsexchangefrom the list. ClickExploreto view the data. Select the data to be restored and then clickNext 
  3.  On theRestore->Wherepage, SelectOriginal Locationradio button. Enter the details of the destination Exchange Server in theDestination Hostfield, and fill the rest of the form.   
  4. Review theRestore FromandRestore Tosettings on theRestore->Nowpage. Once confirmed, clickRestoreto start the restore process.  
  5. After the restore completes, the ZMC displays a message asking you to manually mount the databases. 

When restoring to the original location, the ZWC restores via VSS. This means that the MS Exchange Information Store service will not be stopped before the restore. The Exchange Writer runs its own pre and post restore operations which are logged in the Windows Application Event log. ZWC does not mount the databases after restore. Therefore you must manually mount the storage groups that were dismounted before the restore. When the storage group is mounted, the Exchange store automatically replays any pending transactions using the Exchange Server soft recovery feature.  

Restoring to an Alternate (or Recovery) Server  


There are two reasons to restore to a different machine than that from which the backup was taken:  

  • A disaster has destroyed the original hardware. You must restore the database to a rebuilt Exchange Server or to an alternate Exchange server.  
  • You are recovering an individual mailbox. In this case, there are additional steps to apply the recovery to the production Exchange server (see the next section below).  

There are some pre-requisites to restore to a recovery server:  

  •  Ensure the recovery server meets the requirements for restore listed above.


  •  Because you are restoring to an alternate "recovery server" that has a different set of log files, the signatures on the log files must match. To ensure this, either rename theE0x.logfile located in the Transaction log directory, or enable theDo not mount the databaseoption while creating a Mailbox or Public folder store.  

Follow below listed steps to restore data:  

  1.  Open the Zmanda Management Console and go to theRestorePage.  
  2. Enter the original Exchange Server details in theInitial Hostfield. Selectmsexchangeas theInitial Directory. Click "Explore" to view the data. Select the data to be restored and clickNext 
  3.  On theRestore->Wherepage, enter the details of the destination Exchange Server in theDestination Hostfield, and fill the rest of the form out as follows: 
  4. SelectOriginal Locationradio button to restore to original location, or SelectAlternate Locationand enter the value.  
  5. Review theRestore FromandRestore Tosettings on theRestore->Nowpage. Once confirmed, clickRestoreto start the restore process.  

Recovering a Mailbox  

To recover a mailbox, restore to a recovery server as described above, then follow these additional steps:  

  1. Using the Exchange System Manager, run theCleanup Agenton the Mailboxes to display the restored mailboxes. ThenReconnectthe mailbox from which you wish to retrieve the mails to its associated User account. For example, if you want to retrieve mails for userAdministrator, then reconnect theAdministratormailbox toAdministratoruser account.  
  2. Use Microsoft'sexmerge.exeutility to extract the mails into a PST. Use theTwo step procedure, and select Step 1 to create the PST file. 



3.              Copy the PST file to the production server.  

4.              Run theexmerge.exeutility on the production server to merge the PST mails into the required mailbox. Use theTwo step procedure, and select Step 2 toImportthe data into an Exchange Server Mailbox. 

The deleted emails should now be recovered.  

Restoring to a Recovery Storage Group/Database  


To restore few deleted mails, one might want to restore the storage group or database to a recovery storage group or database first, and then useexmerge.exetool to recover the required mails as shown in the previous section. 

Troubleshooting Backups  


  • If an Exchange backup fails, follow these troubleshooting steps:  

1.              Examine the Windows Event Viewer for any VSS or Exchange Writer errors. Run the commandvssadmin list writersat the Windows command prompt, and check that the state of the Exchange Writer is stable. If not (or if there are any VSS errors), restart the Volume Shadow Copy Service.  

2.              Make sure that the Exchange Storage Groups are inMountedstate.  

Troubleshooting Restores  


Some important Microsoft documentation for better understanding of Exchange recovery strategies : How to recover or to restore a single mailbox in Exchange Server 2003, and theExchange 2003 Disaster Recovery Operations Guide.