【问题标题】:Restoring tfs from backup - problem with attaching collection从备份中恢复 tfs - 附加集合的问题
【发布时间】:2020-04-03 10:28:01
【问题描述】:

我有 TFS 的 2015 计划备份创建的 TFS 备份,我正在尝试在不同的服务器上恢复它们​​,但由于某种原因,我什至无法附加集合(甚至还没有谈论 Tfs_Configuration)。我设法通过 TFS 控制台恢复备份 -> 计划备份 -> 恢复

但我不能附上它

TfsConfig registerDB /sqlInstance:SQL\NEW_TFS /databaseName:Tfs_Collection1

The following exception was caught while trying to validate the database:
TF30040: The database is not correctly configured. Contact your Team Foundation Server administrator.

这背后的原因是什么?

我试过这个https://stackoverflow.com/a/10853481/10522960 来解决这个问题,但它根本没有帮助

还有

首先,请确保您是 Team Foundation Administrators 安全组的成员,并且是 Team Foundation Server 使用的任何 SQL Server 数据库的 sysadmin 安全组的成员。

没有这样的组(Computer Management -> Local Users and Groups -> Groups),不应该是tfs创建的吗?

TfsConfig offlineDetach /configurationDB:SQL\NEW_TFS;Tfs_Configuration /collectionDB:SQL\NEW_TFS;Tfs_Collection1

The database 'SQL\NEW_TFS;Tfs_Collection1' is hosting Team Project Collection with ID 'da9b771c-a149-62d1-a7b0-e
1ad79977102', however this collection is not registered in the specified configuration database.

我一直在尝试更改里面的应用程序 ID

C:\Program Files\Microsoft Team Foundation Server 14.0\Application Tier\Web Services\web.CONFIG 

da9b771c-a149-62d1-a7b0-e1ad79977102,但它根本没有帮助

有人知道发生了什么吗?谢谢!

【问题讨论】:

  • 您是否在进行备份之前分离了集合?
  • @JamesReed 备份是自动的,我在某处看到它们没有分离,所以没有:/

标签: tfs azure-devops tfs-2015


【解决方案1】:

如果您想在不分离集合的情况下恢复标准备份,您需要先恢复配置数据库。您还需要update the TFS GUID 否则它将被识别为与 Visual Studio 中发生的原始和奇怪的事情相同的 TFS 服务器。

当您分离一个集合时,所有集合特定的配置都会从配置数据库复制到集合数据库中。此过程使集合可移植,请注意,这也会使集合脱机。然后,您可以备份收集数据库并将其还原到具有“干净”配置数据库的新 TFS 服务器。恢复备份后,您将能够附加该集合。

附加集合然后将所有集合特定的配置复制到新的配置数据库中

【讨论】:

  • 我使用了changeServerId,它告诉我[Error] [Database Verifications] TF400311: The database connection strings are n ot valid and cannot be automatically corrected. To fix this problem, use the TFS Config RemapDBs command-line tool to correct the database connection strings.。所以我使用了RemapDbs,它起作用了——这些集合是可附加的,谢谢!
【解决方案2】:

您为什么尝试使用TfsConfig registerDB 进行收藏?根据手册,RegisterDB 只移动配置数据库:

使用 registerDB 更新托管服务器的名称 Azure DevOps 服务器中的配置数据库。你可以用这个 将配置数据库恢复到新硬件时的命令或 更改部署的域时。

要附加恢复的集合,您可以使用 Team Foundation Server 管理控制台:Attach the collection

【讨论】:

  • 问题是来自 TFS 控制台的 attach the collection 在此 SQL 实例上看不到任何集合,同时它是通过 Restore 选项直接从备份中恢复的
  • @Joelty 当前用户似乎没有恢复的集合数据库的权限。 Before you start your move, make sure that you're an administrator on the servers and in the software used by both the deployment you're moving from, and the one you're moving to.查看本手册的权限:Add server-level administrators to Azure DevOps Server
【解决方案3】:
  1. 使用“Team Foundation Server 管理控制台”分离集合。
  2. 为分离的集合创建备份。
  3. 在目标 sql 服务器上恢复备份。
  4. 使用“Team Foundation Server 管理控制台”再次将集合附加到目标服务器。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-05-14
    • 2016-12-05
    • 1970-01-01
    • 1970-01-01
    • 2020-06-15
    • 1970-01-01
    • 1970-01-01
    • 2010-10-11
    相关资源
    最近更新 更多