1. Backup requirements summary
Backup requirements vary according to the servers involved. The following table is a summary of what to back up for Microsoft Dynamics CRM.
Server What to back up for Microsoft Dynamics CRM Comments
Domain controller Full System State None.
Exchange Server Backup not required by Microsoft Dynamics CRM. Backup may be required for Exchange.
SQL Server MSCRM_CONFIG
ReportServertempdb Backup should be done by using Reporting Services. The OrganizationName_MSCRM and ReportServer databases should have full database backups and transaction log backups. For databases that are rarely updated, such as msdb and MSCRM_CONFIG, you may select only full database backup. Backup of the master and msdb databases are not required by Microsoft Dynamics CRM but should be part of an overall backup strategy.
Microsoft Dynamics CRM Server web.config
(Default location: c:\Inetpub\wwwroot)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM The web.config file is required only if the file has been changed from the default settings. The file location assumes the installation occurred at the Default Web site.
Windows registry subkey.
1.1 Selecting a backup model
When you back up to tape, we recommend that you select a tape backup rotation model that guarantees data protection in case a tape malfunctions or loss. When backing up to disk, you can implement similar logic for rotating disk files. A popular tape rotation scheme is grandparent-parent-child:
• The tape used for backup on the last Friday of each month is called the grandparent tape. This tape is stored off-site.
• The tape used for backup every Friday (except the last Friday of the month) is called the parent tape. This tape is also stored off-site.
• The tapes used for backup on Monday, Tuesday, Wednesday, and Thursday are called child tapes. Frequently all child tapes are stored on-site except for the tape from the previous day.
The following backup options are available when you use the Microsoft Backup and Restore Wizard:
• Normal. Backs up all selected files and marks the files as backed up.
• Copy. Backs up all selected files, but does not mark the files as backed up.
• Differential. Backs up selected files, only if they have not been previously backed up, or changed since the last backup, but does not mark the files as backed up.
• Incremental. Backs up selected files, only if they have not been previously backed up, or changed, since the last backup, and marks the files as backed up.
• Daily. Backs up only files that have been changed, on that particular day, and marks them as backed up.
Because many small businesses typically do not have system administrators on staff, a regular backup, which is performed daily and according to the suggested grandparent-parent-child backup model, is recommended for small organizations. Larger organizations likely have an existing backup methodology that Microsoft Dynamics CRM will fit into.
1.2 Backing up Windows Server 2003
Windows Server 2003 has a comprehensive backup utility that lets you back up important company data to disk or tape media. The scheduling capability found in the Backup and Restore Wizard provides data backup for the server itself and workstations in the small business network. The data backed up includes security information, file and share permissions, and registry data. For data security, only a member of the Administrators or Backup Operators group can perform a backup. Individual files and directories on the server can be restored by using the Backup and Restore Wizard.
When you back up to tape, the Backup and Restore Wizard requires that the tape backup device be connected to a compatible SCSI or non-SCSI controller card. The controller card must be installed correctly and functional. Windows Server 2003 automates the installation of a controller card because the new hardware is detected at system startup and the correct drivers are automatically installed.
1.3 Backing up Active Directory
The Backup and Restore Wizard can back up System State data, which includes Active Directory, system startup files, the Component Services Class Registration database, the registry, and SysVol. Possible backup locations for System State data include floppy disks, hard disks, removable media, recordable compact discs, and tapes.
Although we recommend that you back up Active Directory, the only way to avoid data loss is to have multiple Active Directory domain controllers. Then, if a domain controller fails, the other domain controllers will have a complete copy of the directory. With a tape backup, you have data only as recent as your last backup.
Active Directory is a transacted database system that uses log files that support roll-back semantics to make sure that transactions are committed to the database. The files associated with Active Directory are as follows:
• Ntds.dit. The database.
• Edbxxxxx.log. Transaction logs.
• Edb.chk. Checkpoint file.
• Res1.log and Res2.log. Reserved log files.
Ntds.dit grows as the database fills up. However, the logs are of fixed size (10 MB). Any change made to the database is also appended to the current log file, and its disk image is always kept up to date.
Edb.log is the current log file. When a change is made to the database, it is written to the Edb.log file. When the Edb.log file is full of transactions, it is renamed to Edbxxxxx.log. (It starts at 00001 and continues to increment by using hexadecimal notation.) Because Active Directory uses circular logging, old log files are constantly deleted as soon as they have been written to the database. At any point in time, you will have the Edb.log file and maybe one or more Edbxxxxx.log files.
The Edb.chk file stores the database checkpoint, which identifies the point where the database engine has to replay the logs, generally at the time of recovery or initialization.
Res1.log and Res2.log are "placeholders," designed to reserve (in this case) the last 20 MB of disk space. This gives the log files sufficient room for a graceful shutdown if all other disk space is consumed.
1.4 Backing up SQL Server, including Reporting Services
The Backup and Restore Wizard in Windows Server 2003 cannot back up SQL Server databases that are online, instead you must first stop the MSSQLSERVER service. A better solution that can be used while SQL Server runs is the built-in backup. Use SQL Server 2005 Management Studio to create a backup of the SQL Server databases. Then, you can run a backup job from the Backup and Restore Wizard to include database backups that Reporting Services created. You would schedule the backup routing in Reporting Services to run first, followed by a backup job run in the Backup and Restore Wizard. For more information about SQL Server backups, see Backing up and Restoring Databases in SQL Server Books Online.
Microsoft Dynamics CRM creates at least two Microsoft Dynamics CRM-specific databases on SQL Server. In addition, Microsoft Dynamics CRM requires the default master and msdb SQL Server databases for database services and the default report server SQL Server databases for Reporting Services. The databases that make up a Microsoft Dynamics CRM system on SQL Server are as follows:
Your Microsoft Dynamics CRM deployment may include more than one OrganizationName_MSCRM database.
The SQL Server backup plan should address each of these databases to make sure that Microsoft Dynamics CRM could recover if one, or all, databases fail. If your organization already has SQL Server or another database application, your database administrator may have a database backup strategy. However, if this is the first database application in your organization, you can create and maintain scheduled backup jobs to perform the necessary backups by using the Maintenance Plan Wizard in SQL Server 2005 Management Studio. To start the Maintenance Plan Wizard, in Reporting Services, expand the server, expand the Management folder, right-click the Maintenance Plans folder, and then click Maintenance Plan Wizard.
Your backup plan for the Microsoft Dynamics CRM databases provides you a backup set that includes a full database backup and some number of transaction log backups, depending on the Microsoft Dynamics CRM installation and the frequency with which you determine whether you must have backups. For more information about backup and restore strategies, see SQL Server Books Online.
For databases that are updated infrequently, such as msdb and MSCRM_CONFIG, you might perform only full database backups. The OrganizationName_MSCRM and ReportServer databases should have both full database and transaction-log backups
Databases on which transaction log backups will be performed must have the Full recovery model database property set. You can set this property through SQL Server 2005 Management Studio. For more information about how to set database properties, see "How to Change the Configuration Settings for a Database" in SQL Server Books Online.
Schedule full database backups frequently enough to reduce the number of restores after a failure. For example, if one day's data loss is acceptable, you can back up the transaction log one time per day, and back up the database one time per week. If only one hour's maximum data loss is acceptable, you can back up the transaction log one time per hour. To reduce the number of restores, back up the database one time per day.
To create a database maintenance plan for scheduled backups, run the Maintenance Plan Wizard from SQL Server 2005 Management Studio. Select the option to back up the database as part of the maintenance plan for a full database backup. Select the option to back up the transaction log as part of the maintenance plan for a transaction log backup.
Your computer that is running SQL Server should also be designed with a level of fault-tolerance that is correct for a database server. This includes a RAID-5 disk array for your databases and a RAID-0 (mirror) for your transaction logs. With the correct level of hardware fault-tolerance, restoring from backup should be a very uncommon occurrence.
1.5 Backing up Exchange Server 2003 and Exchange Server 2007
The Backup and Restore Wizard in Windows Server 2003 can back up the Exchange Server 2003 or Exchange Server 2007 Information Store and directory services databases. Backing up the Exchange Information Store is an important part of creating a fault-tolerant messaging system. The backup and restore features in Exchange Server help you recover from various types of data loss with minimal downtime for your e-mail system.
Exchange Server uses the Backup and Restore Wizard to back up and restore the Exchange Information Store. The wizard helps you protect data from accidental loss or hardware and media failure by using a storage device to back up and restore data on any server in your organization locally, or over the network.
Improvements in Exchange Server make sure that backing up and restoring data is efficient and reliable. For example, you can restore one or more mailbox stores, or public folder stores, without shutting down the Information Store.
You can make sure that your organization is prepared to recover from data loss by performing the necessary planning and implementation. Developing a backup and restoration strategy consists of the following steps:
1. Understand Exchange Server database and storage group technology.
2. Design a backup plan.
3. Develop failure-recovery strategies.
4. Restore data.
The Microsoft Dynamics CRM E-mail Router can be installed to receive incoming e-mail messages from Exchange Servers. If the E-mail Router fails and is recovered, the E-mail Router component must be reinstalled so that it will continue to identify Microsoft Dynamics CRM e-mail messages as they enter the organization.
1.6 Backing up Microsoft Dynamics CRM Server
Backing up and restoring the Microsoft Dynamics CRM Server basically involves the following data:
• Microsoft Dynamics CRM Server database files (explained previously)
• Microsoft Dynamics CRM Server program files
• Microsoft Dynamics CRM Web site files
• Customizations made to Microsoft Dynamics CRM
By default, all Microsoft Dynamics CRM program files are located in the following folder:
C:\Program Files\Microsoft CRM\
By default, the Microsoft Dynamics CRM Web site files are located in the following folder:
The Export Customizations tool can be used to back up Microsoft Dynamics CRM customizations such as modified forms, views, and mappings. The Export Customizations tool is located in the Customizations area of the Settings area in the Microsoft Dynamics CRM application. It is a good practice to make a backup of your customizations before you try to make changes.
1.6.1 Backing up your Customizations
It's a good idea to back up (Export) your Customizations on a fairly regular basis - after you create or alter any of your Entities, Workflows, etc. This is a very simple process that can make your live easier in the future. If you are just getting started with CRM Live, go ahead and create a baseline export of the pristine system.
1. Navigate to Settings -> Customizations -> Export Customizations.
2. Select More Actions -> Export All Customizations.
3. You may get an Internet Explorer warning. Click Download File.
4. Don't be surprised if your only result is that you go back to your main Workplace screen. Simply repeat steps 1 & 2 above and I expect you will be successful
5. Give the customization.zip file a logical name and save it to a location that has strong backup procedures in place.
2. Failure Recovery
To understand the failure-recovery procedures, you must examine several different scenarios to learn how restoration occurs in each case. For each scenario in this guide, total server failure is assumed. The following four scenarios contain information that shows the steps to ensure successful recovery.
2.1 SQL Server failure
If the computer that is running Microsoft SQL Server fails, you must restore the databases from backup, and then re-associate them with the Microsoft Dynamics CRM deployment.
To recover from this failure, follow these steps:
1. Install Windows Server 2003 or Windows Server 2008, and make sure that the computer is in the same domain as the Microsoft Dynamics CRM Server. In addition, you should use the same database name and disk structure. If you change either of these, you must take additional steps to correctly restore the SQL Server databases.
2. Install SQL Server.
3. If you have a valid backup of the master database, restore that backup. For more information, see Restoring the master Database in SQL Server Books Online.
4. Restore the msdb database. For more information, see Restoring the model and msdb Databases in SQL Server Books Online.
5. Restore the MSCRM_CONFIG and OrganizationName_MSCRM databases. For more information about how to restore databases, see Backing Up and Restoring Databases.
6. If Microsoft SQL Server Reporting Services and the Microsoft Dynamics CRM 4.0 Connector for Microsoft SQL Server Reporting Services are also installed on the instance of SQL Server, restore the ReportServer and ReportServertempDB databases. For more information about how to restore databases, see Backing Up and Restoring Databases.
7. If you restored the MSCRM_CONFIG database, you must run Microsoft Dynamics CRM Server Setup and use the Connect to existing databases option on the Specify Deployment Options page. If you did not restore the MSCRM_CONFIG database and the database is functioning correctly, you use the Import Organization feature in Microsoft Dynamics CRM Deployment Manager to re-associate the organization database with the Microsoft Dynamics CRM system. For more information about how to import an organization, see the Deployment Manager Help.
This scenario is a worst-case situation, that is, total failure of the computer that is running SQL Server. In other circumstances, such as the failure of a disk, you may only have to restore a single database to recover the environment
2.2 Microsoft Dynamics CRM Server failure
Most of the Microsoft Dynamics CRM configuration information is stored on the computer that is running SQL Server. Therefore, the information can be recovered if all, or part, of Microsoft Dynamics CRM Server fails. Registry entries on the Microsoft Dynamics CRM Server are recovered when you run repair or reinstall processes for the Microsoft Dynamics CRM Server and Microsoft Dynamics CRM 4.0 Connector for Microsoft SQL Server Reporting Services.
If the computer that is running Microsoft Dynamics CRM Server fails, follow these steps:
1. Install the operating system on another server and join the same domain as the computer that is running SQL Server.
2. Install Microsoft Dynamics CRM Server. During Setup, you must select Connect to existing databases when you are prompted. If Microsoft Dynamics CRM 4.0 Connector for Microsoft SQL Server Reporting Services was also installed on the computer that failed, install the Microsoft Dynamics CRM 4.0 Connector for Microsoft SQL Server Reporting Services after Microsoft Dynamics CRM Server is completed.
3. If ISV.config and web.config have been changed from their default settings, restore these files from backup.
4. Publish all customizations. To do this, in the Web application, click Settings, click Customization, click Customize Entities, on the Actions toolbar select More Actions, and then click Publish all Customizations.
2.2.1 Uninstall or repair Microsoft Dynamics CRM Server
To remove (uninstall) Microsoft Dynamics CRM Server, on the computer where the application is installed go to Add or Remove Programs, click Microsoft Dynamics CRM Server, click Change/Remove, select Uninstall to remove Microsoft Dynamics CRM Server, and then click Uninstall. Follow the instructions that are on the screen.
The Microsoft Dynamics CRM uninstall process does not remove some components, such as the SQL Server databases, Active Directory groups, or the Microsoft Dynamics CRM Web site. Those components must be removed manually.
For more information about how to remove these components, or how to remove components if Setup cannot successfully remove them, see KB article 946980: How to manually remove the Microsoft Dynamics CRM 4.0 server.
To repair a damaged Microsoft Dynamics CRM Server installation, click Microsoft Dynamics CRM Server, click Change/Remove, select Repair, and then click Next. Follow the instructions that are on the screen.
2.3 Exchange Server failure
The process to restore a Microsoft Exchange Server computer that is used by Microsoft Dynamics CRM depends on the other uses of that instance of Exchange Server. Except for the forward mailbox, Microsoft Dynamics CRM does not directly use Exchange Server mailboxes.
Installing the E-mail Router on a computer that is running Exchange Server is not required.
1. Restore Exchange Server.
2. If the E-mail Router was installed on the computer that is running Exchange Server, reinstall the E-mail Router.
3. Restore the Microsoft.Crm.Tools.EmailAgent.xml file. By default, this file is located in the Drive:\Program Files\Microsoft CRM Email\Service folder. If this file is not available, you must reconfigure the profiles, settings, users, queue, and forward-mailbox information by running the E-mail Router Configuration Manager.
2.4 Active Directory failure
In most environments, it is highly unlikely that Active Directory will fail on its own, because more than one Active Directory domain controller should be installed.
To recover from a failed domain controller, follow these steps:
1. Reinstall the Windows Server 2003 or Windows Server 2008operating system.
2. Perform a system state restore.
Make sure that you have a method for recovering from an Active Directory failure. Regardless of the size of your environment, you should consider having multiple domain controllers with regular backups of the system state. If your backups are not current, any data that belong to Microsoft Dynamics CRM objects in Active Directory will be orphaned in SQL Server and therefore will be unrecoverable. Any changes that are made in Microsoft Dynamics CRM, such as adding new Microsoft Dynamics CRM users or queues, requires that Active Directory is backed up immediately after the change.
One major problem can occur with Active Directory that stops Microsoft Dynamics CRM from functioning. If an administrator unintentionally deletes the organizational unit (OU) that corresponds to a Microsoft Dynamics CRM deployment, it becomes inoperable. Similarly, if any of the OU security groups that are created by Microsoft Dynamics CRM are deleted (such as PrivUserGroup, ReportingGroup, PrivReportingGroup, SQLAccessGroup, or UserGroup), Microsoft Dynamics CRM will no longer function correctly. In either of these events, an authoritative restore of Active Directory restores the deleted OU, and security groups, to their original state.
2.5 Microsoft Dynamics CRM for Outlook failure recovery
Microsoft Dynamics CRM for Microsoft Office Outlook with Offline Access includes functionality that uses Microsoft SQL Server 2005 Express Edition. This enables Microsoft Dynamics CRM users to work offline with data synchronized to SQL Server when Microsoft Dynamics CRM for Outlook with Offline Access is brought online again.
In some cases, Microsoft Dynamics CRM users may want to back up the local SQL Server 2005 Express Edition database. This is especially useful when Microsoft Dynamics CRM users are offline for prolonged periods. The following table indicates different methods that can be used for backing up Microsoft Dynamics CRM for Outlook with Offline Access.
Backup Method ,What to Back Up for Microsoft Dynamics CRM
Offline backup Contents of Microsoft Dynamics CRM data directory.
Default location is:
SystemDrive:\Documents and Settings\UserName\Application Data\Microsoft\MSCRM\Data
On Windows Vista, the default location is:
SystemDrive:\Users\UserName\AppData\Roaming\Microsoft\MSCRM\Data Before you start the backup, make sure that the SQL Server (CRM) service is stopped. Restart the service after the backup is complete.
Online backup using Microsoft tools MSCRM_MSDE.mdf
Use the Osql.exe tool that is provided with Microsoft Office Server Extensions.
Online backup using non-Microsoft tools MSCRM_MSDE.mdf
Look for tools that are compatible with SQL Server 2005 Express Edition.
If there is a problem with Microsoft Dynamics CRM for Outlook with Offline Access before the user can reconnect to the server, the backup can be used to restore Microsoft Dynamics CRM functionality to the client. Outlook should be in offline mode before you restore the backup. When restored, you can then connect to the Microsoft Dynamics CRM Server (online mode). The data not already on the server will be transferred to the server from the client. Be careful when reconnecting to the server. If you restore from an outdated backup, the existing data on the server may have subsequently changed. However, neither SQL Server 2005 Express Edition nor SQL Server recognizes this fact. Therefore you run the risk of overwriting current data on the server by using older data from the offline client backup.