A PowerShell tool used to set all eligible blobs (Block) in a specified storage account to the 'Archive' tier, effectively reducing storage costs to approximately 1/10th the price of Hot blobs, for example. Do note that while the cost of 'Archive' storage is significantly reduced, the cost to enumerate/retrieve is significantly higher. Also important, when blobs are descripted as "Archive", early deletion fees apply. Please do your own research and cost analysis prior to leveraging this tool. More information regarding Azure Blob pricing can be found here: https://azure.microsoft.com/en-us/pricing/details/storage/
This was developed and tested in PowerShell 5.1 on Windows Server 2016. There is no installation necessary aside from having a relevant version of PowerShell installed.
NOTE: This is not parameterized and requires manual editing for the time being.
- Download the Set-BlobArchiveTier.ps1 file
- Edit the file to accommodate your variable
- Storage Account Name
- Storage Account Key
- Storage Account Container Name
- Once the file is saved, run the PowerShell script
- Confirm the objects in scope were appropriately descripted as "Archive"
- This can be done from within the Azure Portal, Azure Storage Explorer, or of course within az cli or Azure PowerShell
Note: There is no output when running this PowerShell
- As described above, this simply marks all blobs in the specified scope as "Archive", reducing the storage costs associated with the storage account.
This tool is simple but is not without its shortcomings; all contributions are welcomed.
Aside from working on the random TODO: I would like to see customization of the inputs. For example, specifying which tier, promoting blobs back to Hot or Cool, etc.
I welcome and encourage all feedback and contributions!
- Project homepage: https://github.com/Kentix/AzureArchiveBlobs
- Repository: https://github.com/Kentix/AzureArchiveBlobs
- Issue tracker: https://github.com/Kentix/AzureArchiveBlobs/issues
The code in this project is licensed under the MIT license.