This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Migrating Enterprise Console from Server 2008 to 2012 rs2 , Databackrestore.exe Restore filed.

Hi,

As above and get the below error:

Microsoft (R) Build Engine version 4.0.30319.33440
[Microsoft .NET Framework, version 4.0.30319.33440]
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 19/02/2016 12:48:48.
Copy file C:\ProgramData\Sophos\ManagementServer\Backup\Databases\SOPHOSENC52.ba
k successful.

C:\ProgramData\Sophos\ManagementServer\Backup\DataBackupRestore>sqlcmd -E -S "(l
ocal)\SOPHOS" -d "master" -b -Q "IF EXISTS (SELECT name FROM master.dbo.sysdatab
ases WHERE name = N'SOPHOSENC52') BEGIN ALTER DATABASE SOPHOSENC52 SET OFFLINE W
ITH ROLLBACK AFTER 5 END"
Attempting restore with SQL2012 backup schema.

C:\ProgramData\Sophos\ManagementServer\Backup\DataBackupRestore>sqlcmd -E -S "(l
ocal)\SOPHOS" -d "master" -b -Q "CREATE TABLE #backupSetInfo (BackupName NVARCHA
R(128),BackupDescription NVARCHAR(255),BackupType smallint,ExpirationDate dateti
me,Compressed tinyint,Position smallint,DeviceType tinyint,UserName NVARCHAR(128
),ServerName NVARCHAR(128),DatabaseName NVARCHAR(128),DatabaseVersion INT,Databa
seCreationDate datetime,BackupSize numeric(20,0),FirstLSN numeric(25,0),LastLSN
numeric(25,0),CheckpointLSN numeric(25,0),DatabaseBackupLSN numeric(25,0),Backup
StartDate datetime,BackupFinishDate datetime,SortOrder smallint,CodePage smallin
t,UnicodeLocaleId INT,UnicodeComparisonStyle INT,CompatibilityLevel tinyint,Soft
wareVendorId INT,SoftwareVersionMajor INT,SoftwareVersionMinor INT,SoftwareVersi
onBuild INT,MachineName NVARCHAR(128),Flags INT,BindingID uniqueidentifier,Recov
eryForkID uniqueidentifier,Collation NVARCHAR(128),FamilyGUID uniqueidentifier,H
asBulkLoggedData INT,IsSnapshot INT,IsReadOnly INT,IsSingleUser INT,HasBackupChe
cksums INT,IsDamaged INT,BeginsLogChain INT,HasIncompleteMetaData INT,IsForceOff
line INT,IsCopyOnly INT,FirstRecoveryForkID uniqueidentifier,ForkPointLSN numeri
c(25,0),RecoveryModel NVARCHAR(128),DifferentialBaseLSN numeric(25,0),Differenti
alBaseGUID uniqueidentifier,BackupTypeDescription NVARCHAR(128),BackupSetGUID un
iqueidentifier,CompressedBackupSize INT,containment tinyint); INSERT #backupSetI
nfo EXEC('RESTORE HEADERONLY FROM DISK=N' + '''C:\ProgramData\Sophos\TempData\SO
PHOSENC52.bak'''); DECLARE @backupsetnumber smallint; SET @backupsetnumber = (SE
LECT TOP(1) Position FROM #backupSetInfo ORDER BY BackupFinishDate DESC); RESTOR
E DATABASE SOPHOSENC52 FROM DISK = 'C:\ProgramData\Sophos\TempData\SOPHOSENC52.b
ak' WITH FILE = @backupsetnumber, REPLACE, RECOVERY; DROP TABLE #backupSetInfo;"

Msg 213, Level 16, State 7, Server RYE-SOPHOS\SOPHOS, Line 1
Column name or number of supplied values does not match table definition.
Msg 3013, Level 16, State 1, Server RYE-SOPHOS\SOPHOS, Line 1
RESTORE HEADERONLY is terminating abnormally.
Msg 3250, Level 16, State 1, Server RYE-SOPHOS\SOPHOS, Line 1
The value '0' is not within range for the FILE parameter.
Msg 3013, Level 16, State 1, Server RYE-SOPHOS\SOPHOS, Line 1
RESTORE DATABASE is terminating abnormally.
Attempting restore with SQL2008/SQL2008R2 backup schema.

C:\ProgramData\Sophos\ManagementServer\Backup\DataBackupRestore>sqlcmd -E -S "(l
ocal)\SOPHOS" -d "master" -b -Q "CREATE TABLE #backupSetInfo (BackupName NVARCHA
R(128),BackupDescription NVARCHAR(255),BackupType smallint,ExpirationDate dateti
me,Compressed tinyint,Position smallint,DeviceType tinyint,UserName NVARCHAR(128
),ServerName NVARCHAR(128),DatabaseName NVARCHAR(128),DatabaseVersion INT,Databa
seCreationDate datetime,BackupSize numeric(20,0),FirstLSN numeric(25,0),LastLSN
numeric(25,0),CheckpointLSN numeric(25,0),DatabaseBackupLSN numeric(25,0),Backup
StartDate datetime,BackupFinishDate datetime,SortOrder smallint,CodePage smallin
t,UnicodeLocaleId INT,UnicodeComparisonStyle INT,CompatibilityLevel tinyint,Soft
wareVendorId INT,SoftwareVersionMajor INT,SoftwareVersionMinor INT,SoftwareVersi
onBuild INT,MachineName NVARCHAR(128),Flags INT,BindingID uniqueidentifier,Recov
eryForkID uniqueidentifier,Collation NVARCHAR(128),FamilyGUID uniqueidentifier,H
asBulkLoggedData INT,IsSnapshot INT,IsReadOnly INT,IsSingleUser INT,HasBackupChe
cksums INT,IsDamaged INT,BeginsLogChain INT,HasIncompleteMetaData INT,IsForceOff
line INT,IsCopyOnly INT,FirstRecoveryForkID uniqueidentifier,ForkPointLSN numeri
c(25,0),RecoveryModel NVARCHAR(128),DifferentialBaseLSN numeric(25,0),Differenti
alBaseGUID uniqueidentifier,BackupTypeDescription NVARCHAR(128),BackupSetGUID un
iqueidentifier,CompressedBackupSize INT); INSERT #backupSetInfo EXEC('RESTORE HE
ADERONLY FROM DISK=N' + '''C:\ProgramData\Sophos\TempData\SOPHOSENC52.bak'''); D
ECLARE @backupsetnumber smallint; SET @backupsetnumber = (SELECT TOP(1) Position
 FROM #backupSetInfo ORDER BY BackupFinishDate DESC); RESTORE DATABASE SOPHOSENC
52 FROM DISK = 'C:\ProgramData\Sophos\TempData\SOPHOSENC52.bak' WITH FILE = @bac
kupsetnumber, REPLACE, RECOVERY; DROP TABLE #backupSetInfo;"

(1 rows affected)
Msg 3241, Level 16, State 13, Server RYE-SOPHOS\SOPHOS, Line 1
The media family on device 'C:\ProgramData\Sophos\TempData\SOPHOSENC52.bak' is i
ncorrectly formed. SQL Server cannot process this media family.
Msg 3013, Level 16, State 1, Server RYE-SOPHOS\SOPHOS, Line 1
RESTORE DATABASE is terminating abnormally.
Attempting restore with SQL2005 backup schema.

C:\ProgramData\Sophos\ManagementServer\Backup\DataBackupRestore>sqlcmd -E -S "(l
ocal)\SOPHOS" -d "master" -b -Q "CREATE TABLE #backupSetInfo (BackupName NVARCHA
R(128),BackupDescription NVARCHAR(255),BackupType smallint,ExpirationDate dateti
me,Compressed tinyint,Position smallint,DeviceType tinyint,UserName NVARCHAR(128
),ServerName NVARCHAR(128),DatabaseName NVARCHAR(128),DatabaseVersion INT,Databa
seCreationDate datetime,BackupSize numeric(20,0),FirstLSN numeric(25,0),LastLSN
numeric(25,0),CheckpointLSN numeric(25,0),DatabaseBackupLSN numeric(25,0),Backup
StartDate datetime,BackupFinishDate datetime,SortOrder smallint,CodePage smallin
t,UnicodeLocaleId INT,UnicodeComparisonStyle INT,CompatibilityLevel tinyint,Soft
wareVendorId INT,SoftwareVersionMajor INT,SoftwareVersionMinor INT,SoftwareVersi
onBuild INT,MachineName NVARCHAR(128),Flags INT,BindingID uniqueidentifier,Recov
eryForkID uniqueidentifier,Collation NVARCHAR(128),FamilyGUID uniqueidentifier,H
asBulkLoggedData INT,IsSnapshot INT,IsReadOnly INT,IsSingleUser INT,HasBackupChe
cksums INT,IsDamaged INT,BeginsLogChain INT,HasIncompleteMetaData INT,IsForceOff
line INT,IsCopyOnly INT,FirstRecoveryForkID uniqueidentifier,ForkPointLSN numeri
c(25,0),RecoveryModel NVARCHAR(128),DifferentialBaseLSN numeric(25,0),Differenti
alBaseGUID uniqueidentifier,BackupTypeDescription NVARCHAR(128),BackupSetGUID un
iqueidentifier); INSERT #backupSetInfo EXEC('RESTORE HEADERONLY FROM DISK=N' + '
''C:\ProgramData\Sophos\TempData\SOPHOSENC52.bak'''); DECLARE @backupsetnumber s
mallint; SET @backupsetnumber = (SELECT TOP(1) Position FROM #backupSetInfo ORDE
R BY BackupFinishDate DESC); RESTORE DATABASE SOPHOSENC52 FROM DISK = 'C:\Progra
mData\Sophos\TempData\SOPHOSENC52.bak' WITH FILE = @backupsetnumber, REPLACE, RE
COVERY; DROP TABLE #backupSetInfo;"
Msg 213, Level 16, State 7, Server RYE-SOPHOS\SOPHOS, Line 1
Column name or number of supplied values does not match table definition.
Msg 3013, Level 16, State 1, Server RYE-SOPHOS\SOPHOS, Line 1
RESTORE HEADERONLY is terminating abnormally.
Msg 3250, Level 16, State 1, Server RYE-SOPHOS\SOPHOS, Line 1
The value '0' is not within range for the FILE parameter.
Msg 3013, Level 16, State 1, Server RYE-SOPHOS\SOPHOS, Line 1
RESTORE DATABASE is terminating abnormally.
Failed to restore

C:\ProgramData\Sophos\ManagementServer\Backup\DataBackupRestore>sqlcmd -E -S "(l
ocal)\SOPHOS" -d "master" -b -Q "ALTER DATABASE SOPHOSENC52 SET ONLINE"

C:\ProgramData\Sophos\ManagementServer\Backup\DataBackupRestore>sqlcmd -E -S "(l
ocal)\SOPHOS" -d "SOPHOSENC52" -b -i ResetUserMappings.sql
Process 'C:\ProgramData\Sophos\ManagementServer\Backup\DataBackupRestore\TRS.bat
 (local)\SOPHOS SOPHOSENC52 "C:\ProgramData\Sophos\TempData\SOPHOSENC52.bak"' re
turned Error 1

Build FAILED.

Time Elapsed 00:00:00.81
Process 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe "C:\Program
Data\Sophos\ManagementServer\Backup\DataBackupRestore"\BackupRestore.proj /t:res
tore /clp:NoSummary /p:SubSystem=all;DataSourceType=Database;ExcludeDB=False;Loc
ationSpecific=False;SlientMode=False;DBServerInstance=' returned Error 1

I have tried the trick were you to create the extra folders in the MSSQL but still no luck.



This thread was automatically locked due to age.
Parents
  • Hello Ben Stonehouse,

    the log suggests the database backup is from a SQL2008 instance. The most likely cause for SQL Server cannot process this media family is to attempt the restore on an instance with a "lower" version - this would be somewhat strange though as SEC versions from 5.2 on ship with SQL Express 2008R2. But perhaps check with SELECT SERVERPROPERTY('ProductVersion') AS ProductVersion anyway. OTOH I'd expect that in case of a corrupted backup RESTORE HEADERONLY would fail though.Can't say what else could be the cause.

    Christian

Reply
  • Hello Ben Stonehouse,

    the log suggests the database backup is from a SQL2008 instance. The most likely cause for SQL Server cannot process this media family is to attempt the restore on an instance with a "lower" version - this would be somewhat strange though as SEC versions from 5.2 on ship with SQL Express 2008R2. But perhaps check with SELECT SERVERPROPERTY('ProductVersion') AS ProductVersion anyway. OTOH I'd expect that in case of a corrupted backup RESTORE HEADERONLY would fail though.Can't say what else could be the cause.

    Christian

Children
No Data