Automating MongoDB Atlas Snapshots Download and Export to Local Server using Powershell

Hello everone,

In our organization, we manage databases using MongoDB Atlas, and we have implemented a backup policy where daily snapshots are created with a retention period of 30 days. Currently, these snapshots are stored in Azure and are available for download in .gz format.

We would like to automate the process of downloading these snapshots from Azure and exporting them to a specific server in our local infrastructure. Our goal is to have a local backup of the snapshots for security and compliance purposes.

Now how can i programmatically download the snapshots from Azure using PowerShell?

Any experiences, or suggestions would be greatly appreciated. Thank you in advance for your help!