Restoring Team City database after a clean install

I had our build server operating system rebuilt, so I installed a clean Team City and now I am trying to restore the backup using the commandline tool:

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

but it failes with:

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

I am using the built in file-based database. The backup was done from TeamCity 7.1, and now I installed 8.1 (latest). How can I get it to restore?

4 comments
Comment actions Permalink

Do you have connectionUrl property in database properties file provided to maintainDB.cmd?

0
Comment actions Permalink

The documentation seems to be of rather low quality. What you need to run is:

    maintainDB.cmd restore -F <full file name of TeamCity backup file> -T c:\TeamCity\config\database.hsqldb.properties.dist

Anyway, the restore was reported to be successful, but absolutely nothing got restored as far as I can tell. No VCS root, nor projects.

0
Comment actions Permalink

How do you check that nothing has been restored? According to our documentation you should specify path to new data directory using -A argument. If -A is not used path from TEAMCITY_DATA_PATH environment variable will be used. After restore you should see data directory under this path.

0
Comment actions Permalink

I got confused what actually gets backed up, because for me the most important and obvious things to back up are all the build and VCS configurations. And these are just not backed up. I still don't understand what do you need all the other stuff for if you don't back up your build configurations, but this is a side issue.

What was way more annoying is that I found it impossible to restore build and VCS configurations from TeamCity 7.1 into 8.1 because of the format differences. The only way I found to work around it is to install version 7.1 first, restore everything, and then upgrade to the latest version. It was a big dissapointment, and waste of time. And even bigger dissapointment is the lack of proper documentation.

0

Please sign in to leave a comment.