![build intime build intime](http://cdn.ghstatic.com/images/deluxe/300x150/200957.jpg)
Scenario 4: file_creation_time Raise condition, create alert that more investigation is required what to do next.Scenario 3: file_creation_time restore snapshot.In this situation, the file was only created after corruption occured => soft delete file Scenario 2: file_creation_time > restore_date.Scenario 1: file_last_modified do nothing.
![build intime build intime](https://i.ytimg.com/vi/WqC9cYYGgYI/maxresdefault.jpg)
Then for each individual file, the following scenario is true When data corruption occured, you want the restore the situation right before the data got corrupted. In case now a file is uploaded to the storage account or modified, a snapshot is automatically created, see also image below. Subscribe to event grid # $stordlid = "/subscriptions/$SUB/resourceGroups/$RG/providers/Microsoft.Storage/storageaccounts/$DLSTOR" $endpointid = "/subscriptions/$SUB/resourceGroups/$RG/providers/Microsoft.Web/sites/$FUNNAME/functions/EventGridTriggerCreateSnapshot" az eventgrid event-subscription create -name storegversion -source-resource-id $stordlid -endpoint-type azurefunction -endpoint $endpointid -included-event-types
![build intime build intime](https://jayisgames.com/images/buildintime2.jpg)
Deploy Event Grid triggered Functions # az functionapp plan create -g $RG -n $FUNPN -sku B1 -is-linux true az storage account create -n $FUNSTOR -g $RG -l $LOC -sku Standard_LRS -kind StorageV2 az functionapp create -n $FUNNAME -g $RG -s $FUNSTOR -p $FUNPN -assign-identity -runtime Python $function_mi=$(az functionapp show -n $FUNNAME -g $RG | ConvertFrom-Json).identity.principalId az role assignment create -assignee $function_mi -role "Storage Blob Data Contributor" -scope $scope func azure functionapp publish $FUNNAME # 2.
BUILD INTIME UPDATE
Enable soft delete on storage acount # az storage account blob-service-properties update -n $DLSTOR -g $RG -enable-delete-retention true -delete-retention-days 7 # 5. Add yourself as user to data lake acount # $scope="/subscriptions/$SUB/resourceGroups/$RG/providers/Microsoft.Storage/storageAccounts/$DLSTOR/blobServices/default" az role assignment create -role "Storage Blob Data Contributor" -assignee $email -scope $scope # 4. Create data lake account # az storage account create -n $DLSTOR -g $RG -l $LOC -sku Standard_LRS -kind StorageV2 -enable-hierarchical-namespace true -allow-shared-key-access false # 3. Create resource group # az account set -subscription $SUB az group create -n $RG -l $LOC # 2.
BUILD INTIME ZIP FILE
In case you don’t have git installed, you can just download a zip file from the web page. The following prerequisites are required in this tutorial:įinally, clone the git repo below to your local computer. Architecture, event based snapshot creation- image by author 2.1 Prerequisites