I am facing an issue when executing the Azure Cli command to backup my Azure App Service:
Cli Command :
az webapp config backup create --resource-group --webapp-name
--backup-name testbackup --container-url
I generated a new SaS key to be passed along with the command.
Is this the correct approach.
Cli Output:
{ "backupId": 64862, "backupItemName": "testbackup", "blobName": "testbackup", "correlationId": "3e9ae4d0-9aa9-46e0-9926-53ec1ef6ef2c", "created": "2020-09-22T08:50:35.555268+00:00", "databases": null, "finishedTimeStamp": null, "id": "value", "kind": null, "lastRestoreTimeStamp": null, "location": "Central US", "log": null, "name": "testbackuppr", "resourceGroup": "RG-POC", "scheduled": false, **"sizeInBytes": 0,** "status": "Created", "storageAccountUrl": "", "type": "Microsoft.Web/sites", "websiteSizeInBytes": null }
Log Information in the Portal : Storage access failed. The remote server returned an error: (404) Not Found.. Please delete and recreate backup schedule to mitigate.
Looks like something is not right with the Storage account or its access. Before you execute the
az webapp config backup create
command, please make sure that you have a valid Storage account, a storage container and a SAS token with the appropriate expiry date. The SAS token can be generated with theaz storage container generate-sas
command.The following script worked for me:
Output would be similar to:
References: