I am trying backup and restore of a MS SQL server through VSS. My backup operation is running fine and I store the backup metadata in XML file. During restore operation I am providing the same XML I created during backup operation, what is happening is that restore is failing intermittently in PreRestore Stage returning VSS_E_OBJECT_NOT_FOUND. I have tried following things:
The error comes on one of the following lines (intermittently), sometime it breaks at line1, sometime at line2 or sometime at line3, all these 3 api's I am calling before PreRestore event:
CHECK_COM(m_pVssObject->SetAdditionalRestores(myWriterId, VSS_CT_FILEGROUP, logicalPath, compName, true));
CHECK_COM(m_pVssObject->AddNewTarget(myWriterId, VSS_CT_FILEGROUP, logicalPath, compName, wszPath, wszFileNameMdf, false, wszAlternatePath));
CHECK_COM(m_pVssObject->AddNewTarget(myWriterId, VSS_CT_FILEGROUP, logicalPath, compName, wszPath, wszFileNameLdf, false, wszAlternatePath))
and this is the response it is returning.
INFO: VSS: ERROR: - Returned HRESULT = 0x80042308
INFO: VSS: ERROR: - Error text: VSS_E_OBJECT_NOT_FOUND
A common cause of the error VSS_E_OBJECT_NOT_FOUND (Returned HRESULT = 0x80042308) is that VSS has been disabled on one or more of the volumes that are part of the backup.
You can also test running the command vssadmin list writers.
User contributions licensed under CC BY-SA 3.0