I have 2 DBs synchronized with Always on AG. Name it A (Primary) and B (Replica, Mirror).
On B I take a snapshot of the DB.
Then I failover between the 2 servers (Planned failover) - B is not the primary.
I want to restore the DB to the snapshot. In order to restore it, I need to remove the AG. So I remove the AG, and now I have on server B an active DB, and on server A a DB in a restoring state.
I'm then able to restore the DB on B to the snapshot.
Now I want to restore the AG and to set B as the primary and A as the secondary (so that later I can failover between the 2 and come back to the source state after restoring to the snapshot).
When I try to apply the AG on B replica on A, I get a message that the DBs are not on the same state and I should take a log backup from the primary and apply to the secondary.
When trying to do a log backup on B, I get a message that no full backup is available.
I backup database on B and then backup log.
Then I want to use the log backup to bring A to be synchronized with B, but then I get the message:
This log cannot be restored because a gap in the log chain was created. Use more recent data backups to bridge the gap.
Is it because I restored the B DB to the snapshot, and then the LSN got reset, and now I have no other option than restoring a full backup + TRN to A, or can I use the current Restoring... version of the DB on A and roll forwards only the TRNs?