Azure · Azure DevOps

[Azure DevOps Dynamics] Schedule CRM Solution backup to Sharepoint Document library

In today’s blog I will explain step by step guide to automate CRM solution (Unmanaged/Managed) backup to Sharepoint document library. I will use devops to demonstrate this use case.

Login to dev.azure.com-> Create new project

DevOps01

Once project created successfully, Navigate to Pipeline and create new pipeline. Select Use classic editor option.

DevOps02

Once you click on Use Class Editor link, it will open new dialog and select Agent. Azure devops will automatically populate for you. You can use custom built Agent as well.

DevOps3

Now we need to install Power Devops Tool by Wael Hamze. Once installed add this in your pipeline.

DevOps04

Next we have add Ping Environment task from Power Devops Tools to check if Dynamics CRM instance is up and running. We need to provide CRM Connectiong String in below format

AuthType=Office365;Username=username@name.onmicrosoft.com; Password=CRM Online Password;Url=https://CRMORG.crm8.dynamics.com

DevOps05

Next add Export Solution Task from power devops tool and provide Connection string as mentioned in above steps and Solution Name which you want to take backup.

Select whether you want to export managed or unmanaged solution. Also select additional General settings to be exported as part of the solution.

DevOps06

DevOps07

Next install SharePoint File Uploaded from marketplace which will be used to upload solution zip file to sharepoint.

DevOps08

Next add Upload File to Sharepoint library task to your pipeline. And provide Sharepoint site URL and Target Folder relative URL in below format.

Site URL – https://DomainName.sharepoint.com/sites/CRMDemo

Target Folder – /Shared%20Documents/D365Solution

DevOps09

Click Save and Queue to run the pipeline manually to check everything working fine. I have ran the pipeling manually and I see solution file is uploaded to SharePoint folder.

Devops12

To schedule the Azure dev ops pipeline, Navigate to Triggers tab on pipeline page and select appropriate time and days when you want to run this pipeline.

DevOps11

 

Hope this helps!

One thought on “[Azure DevOps Dynamics] Schedule CRM Solution backup to Sharepoint Document library

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s