If you ever had to download a bigger file from the LCS (Lifecycle Services) asset library you know the problems which come with this task. For example if you have to download a database backup with a size of 10+GB this is kind of a mission impossible. The solution for the problems which comes with the slowness of the download from the LCS asset library is AzCopy: “AzCopy is a command-line utility that you can use to copy blobs or files to or from a storage account.”. With this tool you will be able to copy the files you want to download from LCS asset library to your own storage account and download the file from there. To simplify the process you can use the commands from d365fo.tools as shown as following.
Get the download URL from LCS asset library
First you have to start the download from LCS asset library to get the URL you need for the copy operation. As shown in the screenshot below I would recommend to use the Chrome download page to get the URL.
Generate blob service SAS URL
The next step is to generate a blob service SAS URL for the destination storage account. To generate this URL you have to navigate to the storage account in the Azure portal as shown below.
Assemble and start Invoke-D365AzCopyTransfer from d365fo.tools
To perform the copy to another storage account you can use the command Invoke-D365AzCopyTransfer from d365fo.tools. The command has the following parameters which gets assembled as following.
- SourceUri: This is the URL you copied from the download from LCS.
- DestinationUri: This parameter gets assembled from the SAS URL. After the “base URL”, in my case https://d365fovhd.blob.core.windows.net/, you have to insert the container and destination file name before the question mark e. g. https://d365fovhd.blob.core.windows.net/myContainer/myBackup.bacpac?…
After you copied over the file to your own storage account you can download the same with full speed!
I´ve got the hint from Mötz Jensen that d365fo.tools also contains a wiki page which describes how to use AzCopy: https://github.com/d365collaborative/d365fo.tools/wiki/How-To-Transfer-Via-AzCopy