It’s now possible to download BLOBs directly from your Episerver DXP environments with a PowerShell script – thus removing the need to contact the Episerver support.
For those that need to download BLOBs from your DXP environment there no longer a need to contact the Episerver support anymore. In the beginning of November Episerver updated their EpiCloud PowerShell module to version v0.12.14. In that version two new methods were released that made it possible to download BLOBs, website- and application-logs from the containers that are connected to the DXP project.
The new methods are:
Get-EpiStorageContainer: Retrieves list of blob storage containers for specified project id and environment.
Get-EpiStorageContainerSasLink: Retrieves SAS link for specified project id, environment, storage container and retention hours.
The really cool part is that you have the possibility to download this from either the Integration, Preproduction or Production environments. To make this a little simpler to use, I have created a script that you can run on your local computer to download content.
Here is an example when I download the BLOBs from a DXP website’s Preproduction environment:’
.\DownloadDxpBlobs.ps1 -clientKey "yGxxxxxxxxxxxxxxDz" -clientSecret "s4xxxxxxxxxxxxx/b" -projectId "d5xxxxx4-5xx5-4xx6-bxx4-axxxxxxxxxxc" -environment "Preproduction" -downloadFolder "E:\dev\temp\_blobDownloads"
How to get ProjectId/ClientKey/ClientSecret
Login to https://paasportal.episerver.net/ and select the project. Click on the “API” tab and generate an API Credentials. In the top you can also see the ProjectId.
I feel that this is unlocks new possibilities and I'll continue to play around with these methods and try to come up with more scripts that makes at least my days easier.
You can find the documentation for the download script in our GitHub repo. https://github.com/Epinova/epinova-dxp-deployment/blob/master/Scripts/DownloadDxpBlobs.md
And the script can be downloaded from the same repo. https://github.com/Epinova/epinova-dxp-deployment/blob/master/Scripts/DownloadDxpBlobs.ps1
This article is related to Episerver's Digital Experience Platform.