locked
Management Rules Not Working RRS feed

  • Question

  • Hi - 

    We have followed the instructions shown here to delete files older than 10 days, but are not seeing any indication that the rules are running (and no files are being deleted).  Is there something else that needs to be enabled for this to run?

    Thanks

    Joe

    Thursday, February 27, 2020 9:35 PM

All replies

  • Are you referring to https://docs.microsoft.com/en-us/azure/storage/blobs/storage-lifecycle-management-concepts?tabs=azure-portal ?

    if so, can you post the output of Get-AzStorageAccountManagementPolicy ?

    https://docs.microsoft.com/en-us/powershell/module/az.storage/get-azstorageaccountmanagementpolicy?view=azps-3.5.0

    hth
    Marcin


    Thursday, February 27, 2020 11:15 PM
  • Hi Marcin,

    Thanks for the response.  The output is below.

    Thanks,
    Joe

    ResourceGroupName  : zzzz
    StorageAccountName : zzzzstorage
    Id                 : /subscriptions/resourceGroups/zzzz/providers/Microsoft.Storage/storageAc
                         counts/zzzzstorage/managementPolicies/default
    Type               : Microsoft.Storage/storageAccounts/managementPolicies
    LastModifiedTime   : 2/22/2020 9: 00: 35 AM
    Rules              : [
        {
            "Enabled": true,
            "Name": "DeleteBackupAfter10Days",
            "Definition": {
                "Actions": {
                    "BaseBlob": {
                        "TierToCool": null,
                        "TierToArchive": null,
                        "Delete": {
                            "DaysAfterModificationGreaterThan": 10
                        }
                    },
                    "Snapshot": {
                        "Delete": {
                            "DaysAfterCreationGreaterThan": 10
                        }
                    }
                },
                "Filters": {
                    "PrefixMatch": [
                        "databasebackup/CWE_zzzz"
                    ],
                    "BlobTypes": [
                        "blockBlob"
                    ]
                }
            }
        }
    ]

    Friday, February 28, 2020 1:12 PM
  • @JoeNL Firstly, apologies for the delay in responding here! If you are still facing any issue, please let me know I would like to work on your query
    Thursday, March 19, 2020 2:41 PM