'Be sure you have restored the corresponding full database and each applicable truncated log in succession' SQL restore error.
说明
NetVault Backup environment details...
NetVault Server: 10.0.0.46 CentOS NetVault Server: 10.0.0.46 Windows Server Enterprise 2008 Service Pack 2 SQL Plugin: 5.6.1 and 6.1.2 SQL Server: Microsoft SQL Server 2008 SP3 (10.0.5520) Backup Device: SmartDisk 2.0.0 installed on a virtual machine (VM).
NOTE: While planning deployment of NVSD, be aware that you must deploy it on physical devices (you cannot deploy it on virtual machines).
This information is in the SD Installation Guide in section 3.1.0 on the following link:
The NetVault Backup restore sequence of restoring the Full backup first and then restoring the subsequent Increments were done correctly.
The following messages and errors are from the NetVault logs:
You have also confirmed that the order of the restore jobs are also done in succession, but the restore job mentions that it is not done in succession:
1] Error 2014/09/22 16:07:47 1879 Data Plugin lungdb01_lunghost_local ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]The log in this backup set terminates at LSN 2866000001419000001, which is too early to apply to the database. A more recent log backup that includes LSN 2866000002453500001 can be restored.
With sub text: ODBC Error Number:42000, MsgState=1, Severity=16, Servername=LUNGDB01, ProcName=, LineNumber=1, Message:[Microsoft][ODBC SQL Server Driver][SQL Server]The log in this backup set terminates at LSN 2866000001419000001, which is too early to apply to the database. A more recent log backup that includes LSN 2866000002453500001 can be restored.
2] Error 2014/09/22 16:07:47 1879 Data Plugin lungdb01_lunghost_local ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]RESTORE LOG is terminating abnormally.
With sub text: ODBC Error Number:42000, MsgState=1, Severity=16, Servername=LUNGDB01, ProcName=, LineNumber=1, Message:[Microsoft][ODBC SQL Server Driver][SQL Server]RESTORE LOG is terminating abnormally.
3] Error 2014/09/22 16:07:47 1879 Data Plugin lungdb01_lunghost_local The SQL VDI command failed.
Usually the errors from the Binary log means that a backup externally to NetVault has been taken. If that was the case, then it would have broken the restore sequence and caused the issue. Please check if an external backup has been taken.
解决办法
To check if an external back has been taken, Open the 'Microsoft SQL Server Management Studio' application on the SQL Server and then run the following query to try and gather furher information regarding any backups made outside of NetVault Backup:
select msdb_bks.database_name as DBName, msdb_bks.backup_start_date as StartDate, msdb_bks.backup_finish_date as FinishDate, msdb_bmf.physical_device_name as DeviceName, msdb_bks.first_lsn as FirstLsn, msdb_bks.last_lsn as LastLsn, msdb_bks.checkpoint_lsn as CheckpointLsn, msdb_bks.recovery_model as RecoveryModel, msdb_bks.database_backup_lsn as DatabaseBackupLsn, case msdb_bks.type when 'D' then 'Database' when 'L' then 'Log' end as BackupType, msdb_bks.backup_size as Size, msdb_bks.name as BackupSetName from msdb.dbo.backupmediafamily as msdb_bmf inner join msdb.dbo.backupset as msdb_bks on msdb_bmf.media_set_id = msdb_bks.media_set_id where (convert(datetime, msdb_bks.backup_start_date, 102) >= getdate() - 30) and (msdb_bks.database_name='vitomed_Entwicklung_LLS' or msdb_bks.database_name='vitomed_Entwicklung_LLS_FR') order by DBName, FinishDate desc;
Note: Be sure that the names of the databases at the end of the query, are correct!
If you look at the attached .csv files, you will see that backups outside NetVault are being taken. For example, from the query_Entwicklung_LLS.csv file, you will notice tha in between the two NetVault backups, the end user was trying to restore 14 other backups not taken by NetVault. This has broken the NetVault Backup sequences. As those external backups are taken regularly every 2 hours, then perhaps the end user has a setting in the SQL Server Manager (Microsoft SQL Server Management Studio) that takes regular log backups every 2 hours. Those backups are stored in the following path example for that particular database:
This is not a NetVault related issue, as external backups are being taken and will break the Full / Incremental backup sequence. We would therefore recommend the following steps for future backups:
* The end user might want to plan to stop the log backups performed external to NetVault
or
* Only perform Full Backups with NetVault.
In order to perform a successful restore of all the NetVault and external SQL backups (in this example for this vitomed_Entwicklung_LLS database); restore the NetVault Full backup only for that database, then restore the 14 backups that were not taken by NetVault i.e. the SQL backups, then restore the final NetVault Incremental backup.