gpt4 book ai didi

backup - 全新安装后恢复 Team City 数据库

转载 作者:行者123 更新时间:2023-12-04 23:51:02 26 4
gpt4 key购买 nike

我重建了我们的构建服务器操作系统,所以我安装了一个干净的 Team City,现在我正在尝试使用命令行工具恢复备份:

maintainDB.cmd restore -F <full file name of TeamCity backup file> -T <path to the database.properties file>

但它失败了:
Failed: The file "<path to the database.properties file>" doesn't doesn't contain connectionUrl property. Ignore settings from this file.

我正在使用内置的基于文件的数据库。备份是从 TeamCity 7.1 完成的,现在我安装了 8.1(最新)。我怎样才能让它恢复?

最佳答案

根据文档:

To restore a TeamCity server from a backup file:

  1. Make sure the TeamCity server is not running.
  2. Create the empty target TeamCity Data Directory, configure external database and place database drivers into lib/jdbc sub directory.


这可能是您问题的根源。您需要创建一个空的 TeamCity 数据目录,然后将 .BuildServer\config\database.hsqldb.properties.dist 文件 - 它是一个模板文件 - 并将其保存为 database.hsqldb.properties。该文件包含连接 URL 属性:
_connectionUrl=jdbc:hsqldb:file:$TEAMCITY_SYSTEM_PATH/buildserver_

确保您的连接 URL 正确 .

3.Use the maintainDB utility located in the /bin directory (only available in TeamCity .tar.gz and .exe distributions). Use the restore command:


    maintainDB[cmd|sh] restore -F <full file name of TeamCity backup file> -A <path to TeamCity Data Directory> -T <path to the database.properties file of the target database>

The -A argument can be omitted if you have the TEAMCITY_DATA_PATH environment variable set. The -T argument can be omitted if you want to restore the data into the same database the backup was created from.



目标数据库的 database.properties 文件的路径必须是从模板创建的新 database.hsqldb.properties 的路径。

关于backup - 全新安装后恢复 Team City 数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21986876/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com