TeamCity Data Directory

Search
Searching TeamCity 4.x Documentation
Table of Contents

This is the directory used by TeamCity to store configuration and system files. The config subdirectory contains the configuration of your TeamCity projects, and the system subdirectory contains build logs, artifacts, and database files (if HSQLDB is being used by default). See more on the directory structure in below.

Note that the system directory stores all the artifacts of the builds in the history and can be quite large, so it is recommended to place TeamCity Data Directory on a non-system disk. Please also refer to Clean-Up section to configure automatic cleaning of older builds.

By default, the <TeamCity data directory> is placed in the user's home directory (e.g. it is $HOME/.BuildServer under Linux and C:\Documents and Settings\<user_name>\.BuildServer) under Windows. Alternatively, you can define this directory in one of the following ways:

  • as a Tomcat system property teamcity.data.path (see System Properties for Running the Server)
  • in the TEAMCITY_DATA_PATH environment variable (this will be used if the teamcity.data.path JVM system property is not found)

The TeamCity Windows installer can configure the TeamCity data directory during one of the installation steps.

If you run TeamCity as Windows service installed via standard procedure from the Windows executable file, you will need to modify the teamcity.data.path Tomcat JVM property as described in System Properties for Running the Server. Modifying the TEAMCITY_DATA_PATH environment variable will not work in this case.

The data directory used by the running TeamCity server can be looked up on the Administration > Server Configuration page.

Structure of TeamCity Data Directory

  • .BuildServer/config — a directory where projects, build configurations and general server settings are stored.
    • <project name> — configuration settings specific to a particular project
      • project-config.xml — main project configuration, contains configurations of a project's Build Configurations
      • plugin-settings.xml — auxiliary project settings, like custom project tabs content
      • project-config.xml.N and plugin-settings.xml.N--- backup copies of corresponding files created when a project's configuration is changed via web UI
      • <buildConfigurationID>.buildNumbers.properties — build number settings for a build configuration with internal id "buildConfigurationID"
    • _trash — backup copies of deleted projects
    • main-config.xml — server-wide configuration settings
    • database.properties — database connection settings
    • vcs-roots.xml — VCS roots configurations file (both shared and not shared)
    • roles-config.xml — roles-permissions assignment file
    • email-config.xml — the e-mail notification template
    • jabber-config.xml — the Jabber notification template
    • win32-config.xml — the Windows Tray Notifier notification template
    • ide-notificator-config.xml — the IDE notification template
    • feed-item-template.ftl — template for generating RSS feeds
  • .BuildServer/plugins — a directory where TeamCity plugins can be stored to be loaded automatically on TeamCity start. The structure of a plugin is described in Plugins Packaging.
  • .BuildServer/system — a directory where build results data are stored, namely:
    • license.keys — a file which stores the license keys entered into TeamCity.
    • responsibles.xml — a file which stores the "Take Responsibility" data.
    • artifacts — a directory where the builds' artifacts are stored. The format of artifact storage is <project name>/<build configuration name>/<internal_build_id>
    • messages — a directory where build logs are stored in internal format. Please note that test output and test failure details are stored in the build log files on disk.
    • changes — a directory where the remote run changes are stored in internal format.
    • buildserver.* — a set of files pertaining to the embedded HSQLDB.
    • version.dat — a file which contains the internal version of the configuration files and database. For backup purposes, ensure it is saved/restored in sync with other data files and the database data.
    • caches — a directory with internal caches (of the VCS repository contents, search index). It can be manually deleted to clear caches: they will be restored automatically as needed. However, it's more safe to delete the directory while server is not running.

Direct configuration files modifications

The files in the config directory can be edited manually. They can even be edited without stopping the server. TeamCity monitors these files for changes and rereads them automatically when modifications are detected. Bear in mind that it is easy to break the physical or logical structure of these files, so edit them with extreme caution. Always back up your data before making any changes.

Please note that there are interlinking entries that link by id. Examples of such entries are build configuration -> VCS roots links and VCS root -> project links. All the entries of the same type must have unique ids. New entries can be added only if their ids are unique.
Please note that it is not a good idea to place TeamCity data directory to a network folder. Such folders may disappear if network failure occurs and TeamCity may decide that projects deleted and unload them. If you really need to place data directory to such folder, we strongly recommend to disable files modifications monitoring by launching TeamCity with special system property (available since 3.1.1): teamcity.configuration.checkInterval. Set this property to -1 to disable changes checking, positive value defines changes checking interval in seconds.

Labels