Learning from Expertise#10: Why no restore point available?!

This post has been republished via RSS; it originally appeared at: Microsoft Tech Community - Latest Blogs - .

Introduction 

In today's blog article, we will try to address and clarify some points on how Azure SQL DB and Managed Instance Point in Time Restore (PiTR) works, especially when it comes to failover group and Geo-replication (Azure SQL DB), and we are going to provide answers to common queries. 

 

Use case: 

On some occasions, after the failover is initiated, the current Primary DR will start a new backup chain from that point and old backups are available on the current secondary DR. If we want to restore the backups which exists in Secondary it will not allow us to perform, apparently restore cannot be initiated on the Primary as the backup is not available.  

 

Also, sometimes we observe in secondary DR for few databases, PitR restore point is available and for few databases it shows “no restore point available”    

Ahmed_S_Mahmoud_0-1655128087392.png

 

Common Questions. 

  • Do we expect to lose the PITR ability after failover?   
  • Why are the backups still listed and available on the new secondary if they are not usable?   
  • Why do some databases show the restore point and why for few databases it shows “no restore point available”?  

 

Here is the scenario:   

  • Day 1 - > Geo-Replication/ Failover group setup, Primary in North Europe and Secondary in West Europe, PITR backup retention is set to 7 days.   
  • Day 2 -> Customer initiated failover, now Primary is in West Europe and secondary is in North Europe 
  • Day 4 -> Customer would like to restore the database to the state of Day1 which is possible as 7 days retention was set to PITR backups, and Day1 is 3 days back from current point in time

Ahmed_S_Mahmoud_0-1655106254239.png

 

As we are running backups only for the Primary DR, the new Primary in West Europe does not have the requested PITR backup (Day 1)   

The needed backup is “visible” on the backups listed for current secondary in North Europe  

The customer cannot restore to requested PITR as   

  • The restore cannot be initiated on the secondary as this is not possible for Secondary DR.   
  • The restore cannot be initiated on the primary as the backup is not there.   

 

Also, sometimes you will be seeing available PITR backups on Failover secondary server databases and for some databases it shows as “No restore point available”    
For the databases where the restore point is available, they can’t be able to restore it.  

  • The restore cannot be initiated on the secondary as this is not possible for Secondary DR.  
  • The restore cannot be initiated on the primary as the backup is not there.  

 

Clarifications 

  • In case the database was recently created, the first full backup might be still in the queue, so it might be a promising idea that you wait for some time before checking again. 
  • Failover groups is a disaster recovery feature that allows our customers to recover multiple related databases in a secondary region, after a catastrophic failure or other unplanned event that results in full or partial loss of service’s availability in the primary region.  
  • Database backups are an essential part of any business continuity and disaster recovery strategy because they protect your data from accidental corruption or deletion.  
  • It is important for us to understand that we are not losing any backups, in case the current region was not the primary at the desired point in time where your restoring point is holding, we will need to failover to the other region and make it as Primary, then you should be able to restore it.  
  • Backups are only taken on the Primary server, there can be several justifications why we can see PitR on some DBs and not for others on the Secondary Server.  
  • For the Databases that have PitR it is most probably because there was a failover that caused the Primary to become Secondary, as we have already had backups taken on the old primary which is secondary now.   
  • The DBs that do not have PitR   
  • They could have been provisioned after the last failover happened, so the backups are only available on the primary server  
  • Or they were added to the failover group after the last failover that will also cause the backups to be taken on the primary  

 

It should be fair to say that we will likely “fail back” once availability is restored in the original primary region because we might have picked that region for a reason.  

 

Note: - In case no geo-failover happened nor the database was recently created, and you still see “no restore point available,” please contact Microsoft support.

Alternatives: 

  • you can perform Export operation on the secondary and import it on Primary DR. 
  • You can leverage geo redundant backup and Geo-restore, taking into consideration that Geo-restore is the most basic disaster-recovery solution available in SQL Database and SQL MI. It relies on automatically created geo-replicated backups with a recovery point objective (RPO) up to 1 hour and an estimated recovery time of up to 12 hours. 

 

Note:  Azure SQL Managed Instance does not currently support exporting a database to a BACPAC file using the Azure portal or Azure PowerShell. To export a managed instance into a BACPAC file, use SQL Server Management Studio (SSMS) or SQLPackage. 

 

References: 

Restore a database from a backup - Azure SQL Database & SQL Managed Instance | Microsoft Docs 

Automatic, geo-redundant backups - Azure SQL Database & Azure SQL Managed Instance | Microsoft Docs

Azure SQL Database Point in Time Restore | Azure Blog and Updates | Microsoft Azure

Azure SQL Database Geo-Restore | Azure Blog and Updates | Microsoft Azure

 

Disclaimer 

Please note that the products and options presented in this article are subject to change. This article reflects the database backup options available for Azure SQL database and Azure SQL managed instance in June 2022. 

  

Closing remarks 

We hope you find this article helpful. If you have any feedback, please do not hesitate to provide it in the comment section below. 
 

Raviteja Devarakonda (Author) 

Ahmed Mahmoud (Co-Author) 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.