Backup and Restore for Azure SQL Database
Azure SQL Database provides built‑in, automated backups that enable rapid recovery of your data. Backups are taken without any performance impact and are stored securely in Azure storage.
Key Features
- Automatic backups with up to 35 days of point‑in‑time restore.
- Geo‑redundant storage for disaster recovery.
- Long‑term retention (LTR) for compliance.
- Instant restore for minimal downtime.
Backup Types
| Backup | Retention | Use‑case |
|---|---|---|
| Automated Backups | 7‑35 days (configurable) | Point‑in‑time recovery |
| Long‑term Retention | Up to 10 years | Regulatory compliance |
| Copy‑only Backups | Manual, retained until deleted | Ad‑hoc snapshots |
Restore Options
Choose the appropriate restore method based on the scenario:
- Point‑in‑time restore (PITR): Recover to any second within the retention window.
- Geo‑restore: Restore to a new server in a different region from the geo‑redundant backup.
- Long‑term retention restore: Retrieve backups stored for compliance purposes.
Point‑in‑time Restore Example
az sql db restore \
--dest-name MyDatabaseRestore \
--edition Standard \
--name MyDatabase \
--resource-group MyResourceGroup \
--server myserver \
--time "2025-09-10T12:30:00Z"
Automation with Azure CLI
Integrate backup monitoring into CI/CD pipelines using Azure CLI or PowerShell. The example below checks the earliest backup date for a database:
az sql db show \
--name MyDatabase \
--resource-group MyResourceGroup \
--server myserver \
--query "earliestRestoreDate"