Azure Sql Database: Error when trying to restore deleted DB from long term retention

Michael Anderson 1 Reputation point
2021-09-29T15:14:55.84+00:00

Hi,

I deleted a database yesterday and am now trying to restore it from a long-term retention backup using the Azure Portal.

Go to server
select deleted db
select the db
restore db > changing the setting 'source' - to 'long term retention'
review + create

After 16 seconds the deployment fails with error:

Deployment to resource group 'ResourceGroup' failed.
Additional details from the underlying API that might be helpful: At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.

Checking the deployment operations the error message is:

  "statusCode": "Conflict",
  "statusMessage": {
    "status": "Failed",
    "error": {
      "code": "InternalServerError",
      "message": "An unexpected error occured while processing the request. Tracking ID: 'ID'"
    }

The database was in an elastic pool.

PITR restore seems to work, (it's taken 4hrs and still going). I want to use the LTR backup as this is a test.

Many thanks for any help

Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. Oury Ba-MSFT 16,636 Reputation points Microsoft Employee
    2021-10-04T17:16:24.36+00:00

    @Michael Anderson Thank you for posting your question. We are sorry for the issue you are facing when trying to restore a deleted DB from LTR.
    Please try to do it using PowerShell script
    https://learn.microsoft.com/en-us/powershell/module/az.sql/restore-azsqldatabase?view=azps-4.5.0#examples

    Let us know if that works

    Regards,
    Oury