Implement Data Archiving – The Storage of Data


  1. Log in to the Azure portal at https://portal.azure.com ➢ navigate to the Azure Data Lake storage container you created in Exercise 3.1 ➢ and then navigate to a directory within the container that contains some files. Notice the current access tier and blob type, similar to Figure 4.17.

FIGURE 4.17 Implement data archiving access tier

  1. Navigate back to the Container blade ➢ select the Lifecycle Management link in the navigation menu at the storage account level ➢ place a check in the Enable Access Tracking check box ➢ click the + Add a Rule link ➢ enter a rule name (I used moveToCold) ➢ click Next ➢ select the Last Accessed radio button ➢ enter a value into the More Than (Days Ago) text box (I used 180) ➢ select Move to Cool Storage and Move Back If Accessed from the Then drop‐down text box ➢ review the other options ➢ and then click Add.
  2. Select the + Add rule link ➢ enter a rule name (I used moveToArchive) ➢ click Next ➢ enter a value into the More Than (Days Ago) text box (I used 365) ➢ select Move to Archive Storage from the Then drop‐down text box ➢ and then click Add.
  3. View the created Lifecycle management rules, and then select the Code View tab. Notice that the rules are stored in the JSON file format. The file is available in the Chapter04/Ch04Ex04 directory on GitHub at https://github.com/benperk/ADE.

The moveToCold lifecycle management policy moves any file that has not been accessed for more than 180 days to the Cold access tier. If the file is accessed after being moved to the Cold access tier, it will be moved back to Hot; this is what enableAutoTierToHotFromCool refers to in Table 4.3. If the file has not been modified in 365 days, then the file is moved to the Archive access tier. Finally, as shown in Figure 4.18, if the file has not been accessed in 730 days, it is deleted (and has been disabled in this example).

FIGURE 4.18 Implement data archiving lifecycle management
The rules created in Exercise 4.5 would also apply to the directories that adhere to a common directory naming convention ({yyyy}/{mm}/{dd}/{hh}), that is, so long as the directory and files are stored in the Azure storage account where the lifecycle management policy is applied.

Leave a Reply

Your email address will not be published. Required fields are marked *