Forum Discussion

Serge_CH's avatar
Serge_CH
Copper Contributor
Oct 18, 2023

Unable to restore transaction logs files from a specific DB

Hi,

I'm experiencing a wired behavior when I restore transaction log files after I restored the full DB backup.

The first log can be restored however for the second one, I get generic error telling me a more recent log backup need fist to be restored which in fact does not exist.

 

The order I restore is the same as in msdb.dbo.backupset.

I can restore using FULL  bkp + logs for multiple other Dbs on the same and other SQL instances all using the same bkp script.

Full:

Backup-SqlDatabase -Database $dbName -BackupFile $DB_BKP_DIR\${dbName}.1.bak,$DB_BKP_DIR\${dbName}.2.bak,$DB_BKP_DIR\${dbName}.3.bak,$DB_BKP_DIR\${dbName}.4.bak -Initialize -Checksum

Log:

Backup-SqlDatabase -Database $dbName -BackupFile "$DB_BKP_DIR\${trlogtime}_$dbName.trn" -BackupAction Log -Initialize -Checksum

 

Using:

Microsoft SQL Server 2019 (RTM-CU22) (KB5027702) - 15.0.4322.2 (X64) Jul 27 2023 18:11:00 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: ) (Hypervisor)

 

Architecture: 3 Always-On nodes primary synced with a secondary and async with a third one.

 

The only specificity of the db vs our others is the size, over 2TB uncompressed bkp size.

 

Anyone have/had a similar issue ?

 

Thanks,

Serge

 

 

  • The issue was actually due to a running log backup to NULL on a secondary node, not logged on the primary's msdb.dbo.backupset
  • olafhelper's avatar
    olafhelper
    Bronze Contributor

     


    Serge_CH wrote:

    ... which in fact does not exist.


    Serge_CH , "does not exists" means what; somehow deleted?

    You can't restore what not exists and if SQL Server says, there must be one, then there should be one.

    • Serge_CH's avatar
      Serge_CH
      Copper Contributor

      olafhelper  This is true however msdb.dbo.backupset records the bkps and I have all of them available unless a bkp could be done without being recorded in msdb.dbo.backupset

      • olafhelper's avatar
        olafhelper
        Bronze Contributor
        What has "msdb.dbo.backupset" to do with your restore? ... beside that SSMS uses it to suggest a restore file chain.

Resources