TFS数据库备份失败:XML文档中存在错误

时间:2017-08-25 14:31:05

标签: xml tfs backup tfs2017

这与

中提出的问题完全重复

TFS Database Backup Failed : There is an error in XML document - but which Doc?

这是快速摘要。

问题:

[8/25/2017 8:40:02 AM] [Info] Requested Backup Job: Transactional
[8/25/2017 8:40:02 AM] [Info] -------------------------------------------------------------------
[8/25/2017 8:40:02 AM] [Info] Jobs Requested: Transactional. Completed: None. To Run: Transactional.
[8/25/2017 8:40:02 AM] [Info] RunTransactionalBackupJob
[8/25/2017 8:40:02 AM] [Error] 
Exception Message: There is an error in XML document (23569, 23). (type InvalidOperationException)
Exception Stack Trace:    at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at Microsoft.TeamFoundation.Admin.BackupSets.Load(String folder)
   at Microsoft.TeamFoundation.Admin.Jobs.DatabaseBackupJob.RunTransactionalBackupJob(IVssRequestContext requestContext, BackupSettings settings, ITFLogger logger)
   at Microsoft.TeamFoundation.Admin.Jobs.DatabaseBackupJob.RunBackupJob(IVssRequestContext requestContext, BackupJobType requestedJobType, String& resultMessage)

Inner Exception Details:

Exception Message: Unexpected end of file while parsing Name has occurred. Line 23569, position 23. (type XmlException)
Exception Stack Trace:    at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
   at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String arg)
   at System.Xml.XmlTextReaderImpl.ParseQName(Boolean isQName, Int32 startOffset, Int32& colonPos)
   at System.Xml.XmlTextReaderImpl.ParseElement()
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at System.Xml.XmlTextReaderImpl.Read()
   at System.Xml.XmlReader.MoveToContent()
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderBackupSets.Read5_TfsBackupSet(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderBackupSets.Read6_BackupSets(Boolean isNullable, Boolean checkType)
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderBackupSets.Read7_BackupSets()

[8/25/2017 8:40:02 AM] [Info] Backup Job Finished. Completed: Transactional. Result = Failed

说明: 由于在保存备份的目录中成功解析XML,因此TFS返回失败(BackupSets.xml)

1 个答案:

答案 0 :(得分:2)

答案:

  1. 转到备份存储的目录
  2. 查找" BackupSets.xml"
  3. 将其重命名为" BackupSets_BACKUP.xml" (或其他任何你喜欢的事)
  4. 在TFS管理控制台中重新运行完整备份过程
  5. 结果将重新创建BackupSets.xml,问题应该消失