An Azure relational database service.
Hello Rajnish Sharma,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
Most of all, Azure SQL Database supports automated backups that enable Point-in-Time Restore (PITR) for up to 7 to 35 days, depending on configuration. PITR - https://learn.microsoft.com/en-us/azure/azure-sql/managed-instance/point-in-time-restore?view=azuresqluses:
- Full backups (weekly)
- Differential backups (daily)
- Transaction log backups (every 5–10 minutes)
By practice, you can use the step below to affirm what go wrong and resolve the issue:
- Use PowerShell to check actual restore points:
https://learn.microsoft.com/en-us/powershell/module/az.sql/get-azsqldatabaserestorepoint?view=azps-14.4.0Get-AzSqlDatabaseRestorePoint -ResourceGroupName "<RG>" -ServerName "<Server>" -DatabaseName "<DB>" - To restore to a specific point do:
https://learn.microsoft.com/en-us/powershell/module/az.sql/restore-azsqldatabase?view=azps-14.4.0Restore-AzSqlDatabase ` -FromPointInTime "<UTC-Timestamp>" ` -ResourceGroupName "<RG>" ` -ServerName "<Server>" ` -TargetDatabaseName "<NewDB>" ` -SourceDatabaseName "<OriginalDB>" - Ensure your restore time is correctly converted to Azure SQL UTC timestamps. https://learn.microsoft.com/en-us/azure/azure-sql/database/recovery-using-backups?view=azuresql
- You can use Azure Monitor to check backup success/failure and gaps by Go to: Azure Portal > SQL Database > Monitoring > Alerts and use Query Performance Insight and Database Watcher - https://learn.microsoft.com/en-us/azure/azure-sql/database/monitoring-sql-database-azure-monitor?view=azuresql and https://learn.microsoft.com/en-us/azure/azure-sql/managed-instance/backup-activity-monitor?view=azuresql provide more guides.
- Lower tiers like Basic may have limited PITR capabilities. Upgrade to Standard or Premium for better backup frequency. - https://learn.microsoft.com/en-us/azure/azure-sql/database/service-tiers-sql-database-vcore?view=azuresql
- For production environments, configure LTR to retain backups for up to 10 years using bash command:
az sql db ltr-policy set --resource-group <RG> --server <Server> --database <DB> --weekly-retention P1Y- https://learn.microsoft.com/en-us/azure/azure-sql/database/long-term-retention-overview?view=azuresql
I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.