Skip to content

Instantly share code, notes, and snippets.

@DaveRuijter
Created October 21, 2021 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DaveRuijter/bb85ac7208d9057c69eae9ce7c10358d to your computer and use it in GitHub Desktop.
Save DaveRuijter/bb85ac7208d9057c69eae9ce7c10358d to your computer and use it in GitHub Desktop.
This policy is used on the storage account that contains the backup copies of the Data Lake. This will apply retention of 60 days to the weekly backups, and retention of 30 days to the daily (incremental) backups.
{
"rules": [
{
"enabled": true,
"name": "weeklybackupsrule",
"type": "Lifecycle",
"definition": {
"actions": {
"baseBlob": {
"delete": {
"daysAfterModificationGreaterThan": 60
}
}
},
"filters": {
"blobTypes": [
"blockBlob"
],
"prefixMatch": [
"weekly"
]
}
}
},
{
"enabled": true,
"name": "dailybackupsrule",
"type": "Lifecycle",
"definition": {
"actions": {
"baseBlob": {
"delete": {
"daysAfterModificationGreaterThan": 30
}
}
},
"filters": {
"blobTypes": [
"blockBlob"
],
"prefixMatch": [
"daily"
]
}
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment