how to test a life cycle management policy

Yayavaram, Kiran 20 Reputation points
2023-07-18T16:11:46.31+00:00

After we enable lastAccessTimeTrackingPolicy on a a Blob Storage, is. there a way to find out list of all files under a folder that will be moved/deleted ahead of time.

For example, Lets say i have a storage container name logs/ & there are log files for more than 2 years old. I have policy to move files older than 730 days to cool tier. I wanted to know list of files that will be moved to the cool tier ahead of. time.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,073 questions
0 comments No comments
{count} votes

Accepted answer
  1. AirGordon 7,145 Reputation points
    2023-07-18T16:47:39.15+00:00

    Try using the Azure PowerShell cmdlets. You can query with the lastModified date;

    Get-AzureStorageBlob -Container $ContainerName -Context $Context `
    | Where-Object{$_.LastModified.DateTime -gt (Get-Date).Date.AddDays(-730)}
    

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.