Back up and Restore a Microsoft Dynamics CRM Organization [On-premises ]

  1. On the server that is running SQL Server Management Studio, fire up SQL Server Management Studio
  2. Log in with a user that has access to the MSCRM_CONFIG and related databases
  3. Expand the databases
  4. Right click and select Tasks -> Backup
  5. On the screen that appears, verify that the selected database is correct
  6. Under destination, it will default to the default backup folder set during the install of SQL
  7. If this is where you want to store the naming convention you want, leave this field alone. Our best practice though is to include the date you took the backup in the name, in YYYYMMDD format.mallory_1.png
  8. You shouldn’t need to update anything under the media tab
  9. Under the backup options tab, you have the ability to set whether or not you want to compress the database. For the most part, Microsoft Dynamics CRM databases are relatively small, but the size of your database and the space on your server should really determine whether or not you compress.  For more information on compressing databases in SQL Server: https://msdn.microsoft.com/en-us/library/bb964719.aspx
  10. You’re good to go!  Hit okay and wait for the backup to complete

Restore Database Backup

  1. There are multiple ways to move your database backup, the easiest of which is to map network drives and move the backup from one Virtual Machine to another
  2. Our best practice is to drop the backup in the SQL Backup folder
  3. Once you have the backup of your database on your target server, fire up SQL Server Management Studio
  4. Right click on databases and select restore database
  5. Toggle the source to device and hit the ellipses
  6. This will prompt you to select your backup device
  7. The location will default to the Backup location specified during SQL setup. If this isn’t where you stashed your backup, navigate to where you stored it and select itmallory_2.png
  8. Hit okay, and the UI will spin up the relevant information
  9. Under destination, database: update the database name to use the new name on the new servermallory 1-1.png
  10. Under the files tab, you can update where the Rows and Log are stored, our best practice is to leave these in the Data directory
  11. Verify that the database name in these two files updated when you changed the database name in step 9
  12. You’re good to go!  Hit okay and wait for the restore to complete

Reimport your Org

  1. Fire up deployment manager
  2. Select Organizations, and on the right hand side select Import Organization
  3. Under organizational database, your freshly restored database should appear, hit continuemallory 2.png
  4. Update the display name for your org, the unique database name will automatically update
  5. You can then select to automatically map users, or use a custom mapping, this is really personal preference
  6. You’ll then be prompted to map your users, or you’ll pass the user checks, depending on what you select previously
  7. Hit continue, and deployment manager will kick off the System Check
  8. Once that is complete, hit continue, verify the information is correct, and then hit import
  9. Wait for the import to complete, and once it’s finished, you’re all done!
mallory 3.png

resources

1- https://www.cobalt.net/how-to-back-up-and-restore-a-database-in-a-crm-organization

2- https://learn.microsoft.com/en-us/dynamics365/customerengagement/on-premises/deploy/back-up-the-microsoft-dynamics-365-system?view=op-9-1

Leave Comment

Your email address will not be published. Required fields are marked *