Backup your Microsoft Dynamics CRM 4.0 customizations automatically!

May 11, 2010

no comments

Backup your Microsoft Dynamics CRM 4.0 CRM customizations automatically!

It is always a good practice to backup Microsoft Dynamics CRM customizations regularly or before you modify it, whether you are in development, testing or production phase of your project. If your dev team is working on stand alone VPCs, you need to sync customizations between several CRM deployments.

I have written a simple utility that allows you to define multiple CRM organizations and automatically export CRM organization’s full customizations file to a specified folder or to import it into a different CRM deployment.

This tool can be freely downloaded here.

How can you use it?

  • Put this tool on your desktop and double-click the E4DCustomizationsManager.exe file to instantly export customizations before you start modifying it
  • Set up a Windows Schedule job to automatically activate E4DCustomizationsManager.exe on a regular basis, every day or week
  • Embed E4DCustomizationsManager.exe into TFS process to backup customization as part of your code backup routine

The backup tasks are defined be the CustomizationsMap.xml file. For example, the following definition will handle 2 tasks:

  1. Export full customization file from a CRM organization named krustykrab (this is the organization name, not the display name) into folder c:\.
  2. Export full customization file from a CRM organization named contoso and import it into a CRM organization named krustykrab

<Customizations>
  <Customization>
    <Source>
      <OrganizationName>krustykrab</OrganizationName>
      <CrmService>
http://<CRM SERVER:PORT>/MSCRMServices/2007/CrmService.asmx</CrmService>
    </Source>
    <Destination Type="File">
      <Path>c:\</Path>
    </Destination>
  </Customization>
  <Customization>
    <Source>
      <OrganizationName>contoso</OrganizationName>
      <CrmService>
http://<CRM SERVER:PORT>/MSCRMServices/2007/CrmService.asmx</CrmService>
    </Source>
    <Destination Type="Crm">
      <OrganizationName>krustykrab</OrganizationName>
      <CrmService>
http://<CRM SERVER:PORT>/MSCRMServices/2007/CrmService.asmx</CrmService>
    </Destination>
  </Customization>
</Customizations>

Notes:

  1. It is assumed that the tool is operating under the credentials of a CRM user who has the appropriate privileges to export and import customizations
  2. The Type attribute value in the <Destination Type="File"> determines the export target: ‘File’ for file system folder or ‘Crm’ for CRM deployment. 
  3. For each CRM organization it is required to define the CRMService web service URL
  4. If the process failed, check the E4D.CRM.Service.Metadata.log file for errors.
  5. The exported file includes the source CRM organization name and operation time ticks to prevent a new file from running over  an existing file
  6. This tool was not tested thoroughly, use it at your own risk. 
Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*