I have a test instance configured as always-on go down today due to a restart of the primary node and the file-share going down together. I had a bunch of problems in order to get the secondary functioning again during which I had to remove it from the AG and add it again. During this time (the time when it went down till now) the log backup was running on the primary and when I tried to apply these backups to the secondary I got the following error:
This backup set cannot be applied because it is on a recovery path that is inconsistent with the database. The recovery path is the sequence of data and log backups that have brought the database to a particular recovery point. Find a compatible backup to restore, or restore the rest of the database to match a recovery point within this backup set, which will restore the database to a different point in time. For more information about recovery paths, see SQL Server Books Online.
When I looked at sys.dm_hadr_database_replica_states
:
last_hardened_lsn
: 43000043815500001
When I looked at msdb.dbo.backupset
(backup time):
- backup time: 9:50 am
first_lsn
: 43000043783000001last_lsn
: 43000043887200001
My question is, would there be any way to start applying this log backup starting from LSN 43000043815500001?
I am ok with restoring everything and then connecting my AGs since this is a very small instance, just want to know if there was an easier way as opposed to doing everything from scratch. I looked up online and did see the option for stopbeforemark or stopatmark but I am looking for something like stopaftermark.