Deleting SQL Server backup files from Azure Blob Storage Container

  • Hi,
    Have setup a number of Azure Blob Storage containers where client wants all User db full back ups to be stored however only keeping seven days worth.

    I can use Ola Hallengren's excellent scripts to remove all backup files older than a week when stored on-prem (@CleanUpTime) however I don't see this working for anything in Azure.  

    I have had a snoop around and found this:
    https://docs.microsoft.com/en-gb/azure/cdn/cdn-manage-expiration-of-blob-content

    which I am looking at now however was wondering it there is another way (usually is with SQL Server! 🙂

    Thanks

    qh

    [font="Tahoma"]Who looks outside, dreams; who looks inside, awakes. – Carl Jung.[/font]
  • Anywho, I asked the people at MS and this was their reply (when asked the question about deleting Azure Blob files based on age, etc):
    -------------------------------------------------------------------------------------------------------------------
    Hi qh,

    Thanks for the feedback.   Yes, I can confirm this is something we are working on for an upcoming release later this year. 

    -JV

    Jason Vallery
    Principal Program Manager | Azure Storage | +1.720.352.8822

    ----------------------------------------------------------------------------------------------------------------------

    qh

    [font="Tahoma"]Who looks outside, dreams; who looks inside, awakes. – Carl Jung.[/font]
  • I haven't implemented this personally, but found this github repository when I Binged for your question. Hope this helps you or at least directs you in the correct direction.
    https://github.com/philskents/pjspowershell/blob/master/azure/Remove-OldAzureStorageBlob.ps1
    https://strangeadventures.in/deletingoldfilesfromazureblobstorage/

  • Thank you Sreekanth, that is a great link.

    qh

    [font="Tahoma"]Who looks outside, dreams; who looks inside, awakes. – Carl Jung.[/font]
  • Also found this one:

    http://pietervanhove.azurewebsites.net/?p=3648

    I should really search better before posting! :doze:

    qh

    [font="Tahoma"]Who looks outside, dreams; who looks inside, awakes. – Carl Jung.[/font]

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply