Adding new server to AG fails, log file errors - the log in this backup set...which is too recent to apply to the database?!

  • Ok, I am at a lost to understand this.

    I am trying to add a new server to an AG. 

    1.  The new server is added as a replica successfully.
    2.  Then the wizard creates a backup to a temporary backup share on the new server. There are no other files in this temporary backup location.
    3.  Then it restores the database successfully.
    4.  Then the wizard backups up the log file to the same temporary backup location.
    5.  Then the wizard tries to restore log and it fails.

    The log in this backup set begins at LSN 2170155000000091800001, which is too recent to apply to the database. An earlier log backup that includes LSN 2170149000000088200001 can be restored.

    Msg 3013, Level 16, State 1, Line 83

    RESTORE LOG is terminating abnormally.


    How can the log be too recent if the wizard takes the backup of the log file after creating the full database backup?  How can it be too recent?

    Any ideas?

    Thanks.

    Things will work out.  Get back up, change some parameters and recode.

  • It seems you have log backup job which ran between your full backup and log backup. I suggest you check the records in msdb..backupset

    GASQL.com - Focus on Database and Cloud

  • WebTechie - Thursday, March 29, 2018 12:06 PM

    Ok, I am at a lost to understand this.

    I am trying to add a new server to an AG. 

    1.  The new server is added as a replica successfully.
    2.  Then the wizard creates a backup to a temporary backup share on the new server. There are no other files in this temporary backup location.
    3.  Then it restores the database successfully.
    4.  Then the wizard backups up the log file to the same temporary backup location.
    5.  Then the wizard tries to restore log and it fails.

    The log in this backup set begins at LSN 2170155000000091800001, which is too recent to apply to the database. An earlier log backup that includes LSN 2170149000000088200001 can be restored.

    Msg 3013, Level 16, State 1, Line 83

    RESTORE LOG is terminating abnormally.


    How can the log be too recent if the wizard takes the backup of the log file after creating the full database backup?  How can it be too recent?

    Any ideas?

    Thanks.

    Not sure that's the order.  Run the "Create script" in the Wizard, and look at the code generated,  I think it does both backups, and then the restores.

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/

  • You were exactly right.  I hate the time I spent reading blogs to resolve that issue.

    Yes, I disabled the log backup job and the wizard was able to backup and restore the log file.

    That makes sense now why it was too recent.  There actually was a file that was generated between when the full backup and the log backup by the wizard.

    Thanks.

    Things will work out.  Get back up, change some parameters and recode.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply