6

As part of my Azure Devops release pipeline I want to restore the bacpac of the previous days data from Azure storage.

I am running the following az command

az sql db import -s myprod.database.windows.net -n mydb
-g myresourcegroup -p "${mypassword}" -u myuser
--storage-key "${mystoragekey}" --storage-key-type StorageAccessKey 
--storage-uri 
"https://mystore.blob.core.windows.net/db/bk$(date -d "yesterday" '+%Y-%m-%d').bacpac"

This command fails with the following ERROR: Can not perform requested operation on nested resource. Parent resource 'myprod.database.windows.net/mydb' not found.

The db already exists on the server. Is this saying that the parent in this case is the server or the db? It should be able to find both

Declan McNulty
  • 3,194
  • 6
  • 35
  • 54
  • This article (https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-parent-resource-errors) describes the errors you may get when deploying a resource that is dependent on a parent resource. – CHEEKATLAPRADEEP Dec 20 '18 at 10:06
  • 1
    @CHEEKATLAPRADEEP-MSFT the article doesn't explain this in the scenario when using the azure cli. It just describes that you should use the same resource-group when the server is already there. I do that, and it still fails with this message – Hulvej Jan 31 '20 at 10:57
  • Did this get fixed as I have the same issue right now – Jason Dec 16 '22 at 12:00

0 Answers0