我们的每晚 TFS 2012 备份刚刚开始失败。直接通过 TFS Express 管理控制台运行时也会失败。
以下错误实际上是指哪个文件?如果我能找到它,那么我应该能够修复“缺少根元素”错误:)
[13/08/2014 23:00:00] [Info] Full database backup job
[13/08/2014 23:00:00] [Info] Getting backup lock
[13/08/2014 23:00:05] [Error]
Exception Message: There is an error in XML document (0, 0). (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.FullDatabaseBackupJobExtension.Run(TeamFoundationRequestContext requestContext, TeamFoundationJobDefinition jobDefinition, DateTime jobQueueTime, String& resultMessage)
Inner Exception Details:
Exception Message: Root element is missing. (type XmlException)
Exception Stack Trace: at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlReader.MoveToContent()
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderBackupSets.Read7_BackupSets()
[13/08/2014 23:00:05] [Info] Full Backups Failed
谢谢。
最佳答案
Dylan 回答了我最初的问题,即在哪里可以找到错误的未指定 xml 文件,但万一它可以帮助其他人......
Backupsets.xml 文件为空。为什么这是我不知道... 尝试通过 TFS Express 管理控制台配置备份也失败并出现同样的错误,所以我
- 完全删除了 Backupsets.xml 文件
- 使用向导重新配置备份 - 现在它根本找不到 xml 文件,它创建了一个新文件。
- 运行完整备份 - 成功。希望计划的备份现在也能从现在开始工作。
NB 新创建的 Backupsets.xml 文件(在第一次完整备份之前):
<?xml version="1.0"?>
<BackupSets xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Version>1</Version>
<BackupSets />
</BackupSets>
关于TFS 数据库备份失败 : There is an error in XML document - but which Doc?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25303842/