Thursday, July 31, 2008

Setting up a “mirror” of a production environment for dev/testing

I recently needed to set up a “mirror” of a production system for use in development and testing. I had worked with the Redeployment tool in CRM v3 and I was interested to see how v4 worked. I was very happy when the v4 tool was *very* easy to use, and here are the steps I followed.

1. Used SQL 2005 to do a backup of the CRM v4 production databases
2. Using the VPC image distributed by Microsoft, I copied the .bak file to the VPC. I then did a restore of the database files to the VPC SQL instance. For some reason the SQL GUI did not work, so I used the following command (Names changed):
restore database OrgName_MSCRM from disk='C:\Temp\OrgName_MSCRM.bak' WITH MOVE 'OrgName_MSCRM' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\ OrgName _MSCRM.mdf', MOVE ' OrgName _MSCRM_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\ OrgName _MSCRM_log.LDF'

3. Once the DB was successfully restored on the VPC image, I fired up the CRM Deployment Manager, right-clicked on the “Organizations” item, and selected “Import Organization”
4. The next step asked me to specify the SQL server, and as soon as I did that the deployment manager found the organization I wanted to import
5. The next screen asked me for a name and a display name
6. Next input was the report server URL
7. The next steps involved the mapping of users. There are several options for this tep, I chose to simply “Manually Map Users”, and the only user I mapped was the Administrator which was mapped to the Litwareinc Administrator on the VPC. I got a warning that “All users are not mapped. Do you wish to continue?” and just clicked “Yes”
8. The next screen was simply the tasks verification screen, so I clicked “Next” and then on the next screen “Import”
9. And that was it! It took a bit of time and at the end I am able to access the org via http://moss:5555/orgname/loader.aspx

You can see the screens here but please note names are hidden:

No comments: