2017-08-25 54 views
1

一個錯誤,這是非常多的TFS數據庫備份失敗:有XML文檔

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 

說明: TFS回failes由於被啓用,以成功地解析XML在後面起伏的保存目錄(BackupSets.xml)

+0

的可能的複製[TFS數據庫備份失敗:有XML文檔中的錯誤 - 但醫生?( https://stackoverflow.com/questions/25303842/tfs-database-backup-failed-t這裏,是-一個錯誤,在XML的文檔,但是,這-DOC) – GrimSmiler

回答

1

答案:

  1. 轉至備份項目存儲
  2. 發現「BackupSets.xml」
  3. 重命名爲「BackupSets_BACKUP.xml」(或其他任何你喜歡的)
  4. 重新運行在TFS管理的完整備份過程中的目錄控制檯

結果是該BackupSets.xml將被重新創建,問題就會消失