recoveryazure-sql-serverdisaster-recovery

Azure REST API to recover Azure SQL Server


I am looking at Azure SQL Server & database DR options.

It appears that it is possible to recover a deleted Azure SQL Server: https://learn.microsoft.com/en-us/rest/api/sql/2021-08-01-preview/deleted-servers/recover

Firstly, I can successfully list existing Azure SQL Servers:

az login -t "xxxxxx-xxxx-xxxxx-xxxx-xxxxxxx"

az rest -m get -u 'https://management.azure.com/subscriptions/yyyyyyy-yyyyyyyy-yyyy-yyyy-yyyyyy/providers/Microsoft.Sql/servers?api-version=2021-11-01-preview'

(reference: https://learn.microsoft.com/en-us/rest/api/sql/2021-11-01-preview/servers/list)

However the recovery api is not working for me.

az rest -m post -u 'https://management.azure.com/subscriptions/yyyyyyy-yyyyyyyy-yyyy-yyyy-yyyyyy/providers/Microsoft.Sql/locations/eastus/deletedServers/testsvrxxxx/recover?api-version=2014-04-01-preview'

Any thoughts on how I can get this to work?


Solution

  • Recover Deleted Server through these REST APIs are not supported and these will be removed from documentation in coming days as discussed internally with product team.

    As of now Azure SQL Server recovery is possible only through the Support Request, and that too within 7 days of deletion of Server.