Closed clement911 closed 4 years ago
@clement911 Thanks for the question. We are looking into this and get back to you shortly.
@clement911 No It is not possible to have PITR period less than 7 days. Azure will keep backups of atleast 7 days. And the reason for the same is explained here - https://docs.microsoft.com/en-us/azure/azure-sql/database/automated-backups-overview?tabs=managed-instance#backup-storage-consumption
As explained above and general nature of SQL back ups, a full database back up is required for start of the restore or PITR. The Azure takes full back up every 7 days, hence all differential and Transactional DB backups have to kept to ensure PITR.
If the full DB back up frequency was 3 days or even less, your scenario would have been possible.
@clement911 Do you need any further help regarding this.
@NavtejSaini-MSFT it is definitely possible to set PITR to 1 day.
@clement911 I apologize for the confusion in me understanding the question.This is a difference between changes done through portal and programmatically. Our author @shkale-msft will elaborate more regarding this.
@clement911 You can use PowerShell to set the retention to 3 or a desired value between 1 -35 days for Azure SQL DB (except Hyperscale). Currently, Azure Portal only supports the fixed values shown there. We are working on brining a change to Azure Portal, where we will support a slider, which will let you set the retention to any value between 1-35 (for MI this already works). However, that change is still a few months out. Is it possible for you to use PowerShell till then?
Thanks, shreya
I see.. Can you point me to the relevant documentation on how to do that? What will it show in the portal if I change to 3 days? It's a shame it takes month, a slider seems like it would be easy enough... We are actually planning on moving to Hyperscale. You said it's not possible for Hyperscale? Do you have more info on that?
Here is how you can do it using PowerShell: https://docs.microsoft.com/en-us/azure/azure-sql/database/automated-backups-overview?tabs=single-database#change-the-pitr-backup-retention-period-by-using-powershell This is how you can do it using REST API: https://docs.microsoft.com/en-us/azure/azure-sql/database/automated-backups-overview?tabs=single-database#change-the-pitr-backup-retention-period-by-using-the-rest-api
For Hyperscale, the default retention period is 7 days and it's fixed. The ability to change it to any value between 1-35 days is not available yet.
Thank you, I hope this becomes available in the portal with a slider soon.
Is it not possible to configure a 3 days PITR retention period?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.