Team Foundation Server(TFS)2017无法创建备份

Team Foundation Server(TFS)2017无法创建备份

因此,我们已经运行了几年的备份,但在过去的几天里,它开始备份额外的次数。我重新配置备份以验证设置,并收到一条错误消息,提示无法备份虚拟数据库。

[Info   @12:03:50.669] +-+-+-+-+-| Running Confirming Permissions: Confirming Permissions |+-+-+-+-+-
[Info   @12:03:50.669] 
[Info   @12:03:50.669] +-+-+-+-+-| Confirming Permissions |+-+-+-+-+-
[Info   @12:03:50.669] Starting Node: CONTAINER
[Info   @12:03:50.669] NodePath : Container/Progress
[Info   @12:03:50.669] Node returned: Ignore
[Info   @12:03:50.669] Completed Confirming Permissions: Ignore
[Info   @12:03:50.669] -----------------------------------------------------
[Info   @12:03:50.669] 
[Info   @12:03:50.669] +-+-+-+-+-| Running VerifyCanBackupDatabase: Verifying backing up an empty database succeeds |+-+-+-+-+-
[Info   @12:03:50.669] 
[Info   @12:03:50.669] +-+-+-+-+-| Verifying backing up an empty database succeeds |+-+-+-+-+-
[Info   @12:03:50.669] Starting Node: DUMMYDATABASE
[Info   @12:03:50.669] NodePath : Container/Progress/DUMMYDATABASE
[Info   @12:03:50.669] Creating dummy database to test backup.
[Info   @12:03:51.200] Queue verify backup job
[Info   @12:03:51.263] Queued job [GUID]
[Info   @12:03:51.263] Starting backup job to verify necessary permissions
[Info   @12:03:56.295] Waiting for backup job to finish
[Error  @12:04:01.311] Backup job Failed: TF400797: Job extension had an unhandled error: System.Data.SqlClient.SqlException (0x80131904): The server principal "[DOMAIN\SERVERNAME]$" is not able to access the database "Tfs_Temp[GUID]" under the current security context.
BACKUP DATABASE is terminating abnormally.
   at Microsoft.VisualStudio.Services.Configuration.SqlDatabaseBackupRestoreComponent.Execute(String sqlStatement)
   at Microsoft.VisualStudio.Services.Configuration.SqlDatabaseBackup.Backup(ISqlConnectionInfo connectionInfo)
   at Microsoft.TeamFoundation.Admin.Jobs.DatabaseBackupJob.TakeFullBackupOfSingleDatabase(IVssRequestContext requestContext, String dataSource, String databaseName, String fullFileName, ITFLogger logger)
   at Microsoft.TeamFoundation.Admin.Jobs.VerifyBackupPermissionsJobExtension.Run(IVssRequestContext requestContext, TeamFoundationJobDefinition jobDefinition, DateTime jobQueueTime, String& resultMessage)
   at Microsoft.TeamFoundation.Framework.Server.JobRunner.ExecuteJob(IVssRequestContext requestContext)
ClientConnectionId:00000000-0000-0000-0000-000000000000
Error Number:916,State:1,Class:14
[Info   @12:04:04.405] Node returned: Error
[Error  @12:04:04.405] TF401002: The SQL Server Database Engine failed to save the database backup to path \\[MACHINE]\TFSBackups.  Please grant SQL service account read/write access to that folder.
[Info   @12:04:04.405] Completed VerifyCanBackupDatabase: Error
[Info   @12:04:04.405] -----------------------------------------------------

文件夹的权限很好,我们的服务和机器都具有完全的写入权限

有没有办法绕过这个临时数据库?正常备份可以正常工作,但现在无法备份这个测试数据库,因此它删除了每晚安排的备份

答案1

TFS 服务器备份只能通过恢复全部作为 TFS 实例一部分的数据库。执行跳过其中一个数据库的备份将使您处于不可恢复的状态。

第一个错误消息可能是问题的原因,备份是由 TFS 数据层服务器的 LocalSystem 帐户执行的(例如,[DOMAIN\SERVERNAME]$由于该用户没有创建临时 tfs_temp 数据库备份的权限,因此无法完成完整备份集。

解决方案是从 TFS 管理控制台中删除临时项目集合或修复执行备份的用户的安全设置,以便它可以执行完整的服务器备份。

相关内容