none
Backup RRS feed

  • Question

  • Hello,

    we are taking database backups in storage account. We have different containers for each database and  have scheduled daily full backups.

    now we want to add retention policy of 30 days for our backups i.e. data inside container, it should automatically delete block blobs after 30days.

    I have gone through below  life cycle management document but it didn't help me much.

    https://docs.microsoft.com/en-us/azure/storage/blobs/storage-lifecycle-management-concepts#rule-actions

    Could you please suggest us some methods\\process through which we can apply retention policy for our old back up data in containers.

    Thanks and Regards

    Wednesday, June 12, 2019 10:43 AM

Answers

  • @Raven Peaks Apologies for the delay! All tier changes between Hot, Cool, and Archive are immediate after a successful SetBlobTier call except for when a blob is tiered from Archive to Hot/Cool. We refer to this tier change as rehydration, and it can take several hours to complete. Lifecycle policies are not immediate and run about once a day. So any tier changes using lifecycle would depend on that.

    The platform runs the lifecycle policy once a day. Once you configure a policy, it can take up to 24 hours for some actions to run for the first time.

    Manage the Azure Blob storage lifecycle

    To clarify, if you enable diagnostics log for the storage account, all actions triggered by lifecycle management will be logged, including delete blob and set blob tier. We don't have a summary event to log all the actions taken by lifecycle management for that day, which is the planned work.

    Additional information:

    Example

    Consider a data set that is accessed frequently during the first month, is needed only occasionally for the next two months, is rarely accessed afterwards, and is required to be expired after seven years. In this scenario, hot storage is the best tier to use initially, cool storage is appropriate for occasional access, and archive storage is the best tier after several months and before it is deleted seven years later.

    The following sample policy manages the lifecycle for such data. It applies to block blobs in container “foo”:

    • Tier blobs to cool storage 30 days after last modification
    • Tier blobs to archive storage 90 days after last modification
    • Delete blobs 2,555 days (seven years) after last modification
    • Delete blob snapshots 90 days after snapshot creation

    Monday, June 17, 2019 6:40 AM
    Moderator

All replies

  • Thanks for asking Question! You are following right document for setting retention policy for Azure Containers. Could you double check that  daysAfterModificationGreaterThan is 30.

    {

      "version": "0.5",

      "rules": [

        {

          "name": "expirationRule",

          "type": "Lifecycle",

          "definition": {

            "filters": {

              "blobTypes": [ "blockBlob" ]

            },

            "actions": {

              "baseBlob": {

                "delete": { "daysAfterModificationGreaterThan": 30}

              }

            }

          }

        }

      ]

    }

    Friday, June 14, 2019 6:02 AM
  • I have created rule for life cycle management, given 1 day as retention policy, its been 48hrs but files are still there ,not deleted. so I have two questions :

    1.how much time it will take to apply changes on life cycle management rule

    2. how can i check if my life cycle management rule has worked\executed

    Below is the piece of code used:

    Blob container : test { "rules": [ { "enabled": true,
    "name": "Test", "type": "Lifecycle",
    "definition": { "actions": { "baseBlob": {
    "delete": { "daysAfterModificationGreaterThan": 1 } } },
    "filters": { "blobTypes": [ "blockBlob" ],
    "prefixMatch": [ "test" ] } } } ] }

    Friday, June 14, 2019 8:45 AM
  • @Raven Peaks Apologies for the delay! All tier changes between Hot, Cool, and Archive are immediate after a successful SetBlobTier call except for when a blob is tiered from Archive to Hot/Cool. We refer to this tier change as rehydration, and it can take several hours to complete. Lifecycle policies are not immediate and run about once a day. So any tier changes using lifecycle would depend on that.

    The platform runs the lifecycle policy once a day. Once you configure a policy, it can take up to 24 hours for some actions to run for the first time.

    Manage the Azure Blob storage lifecycle

    To clarify, if you enable diagnostics log for the storage account, all actions triggered by lifecycle management will be logged, including delete blob and set blob tier. We don't have a summary event to log all the actions taken by lifecycle management for that day, which is the planned work.

    Additional information:

    Example

    Consider a data set that is accessed frequently during the first month, is needed only occasionally for the next two months, is rarely accessed afterwards, and is required to be expired after seven years. In this scenario, hot storage is the best tier to use initially, cool storage is appropriate for occasional access, and archive storage is the best tier after several months and before it is deleted seven years later.

    The following sample policy manages the lifecycle for such data. It applies to block blobs in container “foo”:

    • Tier blobs to cool storage 30 days after last modification
    • Tier blobs to archive storage 90 days after last modification
    • Delete blobs 2,555 days (seven years) after last modification
    • Delete blob snapshots 90 days after snapshot creation

    Monday, June 17, 2019 6:40 AM
    Moderator