Reputation: 249
I have an app in an app service, which is tied to a SQL database. It is possible to set up a backup, so that when I restore the app service app, it also restores the SQL database. The instructions to do this are here: https://learn.microsoft.com/en-us/azure/app-service/web-sites-restore
I also have a serverless function which is supposed to restore all blobs in a blob storage account, hopefully at the same restore time that the app and the SQL database were restored. However, I have not been able to find a suitable trigger to do this.
My question is this:
Is there a trigger that can make my serverless function run when I restore my app service app and my database at the same time?
Upvotes: 0
Views: 152
Reputation: 2792
I've not tried this fully end-to-end, but have you looked into the "Monitor Alerts" built into Azure? https://learn.microsoft.com/en-us/azure/azure-monitor/platform/alerts-overview.
It looks like you can set up an alert to react to the Activity Log, and whenever a site Restore is complete, it can call an Azure Function. "Azure Function" is one of the options for an Action Group.
You'll likely need to play with it a bit to get it configured right, but it sounds like it could be the scenario you're looking for.
Upvotes: 1