I have a test instance configured as always on go down today due to a restart of the primary node and the fileshare 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.
Now I looked at the last_hardened_lsn column from sys.dm_hadr_database_replica_states and saw that the the number is 43000043815500001. I then proceeded to check the first_lsn and last_lsn from backupset table in msdb and see that backup taken around 9:50 am had the first_lsn as 43000043783000001 and last_lsn as 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.