0

I am working on an automation infrastructure for an Azure based product. I need the ability to programmatically (no manual UI intervention work allowed) backup and restore an Azure SQL DB. I am looking for the appropriate RESTFul api's but don't see any that fit the bill. Perhaps I missed it ??

Any pointers would be appreciated.

1

1 Answer 1

1

To Export (Backup) the Azure SQL Database, you can use the below HTTP POST request.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/export?api-version=2021-02-01-preview

To know about the URI parameters required in above request, go through this Microsoft official document.

For Restore, you can use Azure PowerShell or the REST API. There are some PowerShell commands you need to learn to accomplish this task. Learn about these commands here Restore-AzSqlDatabase.

Useful link: Programmatic recovery using automated backups

Sign up to request clarification or add additional context in comments.

1 Comment

Hey @Walter!, has it solved your problem; else can you share more details so I can troubleshoot the issue?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.