TeamCity 3.0 Help

TeamCity Data Directory

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 data_directory_structure.

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.

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 Configuration

      • project-config.xml.N — backup copies of project-config.xml created when a project's configuration is changed via web UI

    • _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

  • .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 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 Log are stored in internal format.

    • changes — a directory where the Personal Build 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.

    • sourcesCache — (Only in TeamCity 3.0.x) a directory with internal sources caches. Can be deleted any time to clear caches, they will be restored as needed.

    • clearCaseCache — (Only in TeamCity 3.0.x) a directory with internal ClearCase sources caches. Can be deleted any time to clear caches, they will be restored as needed.

    • caches — (Only in TeamCity 3.1) a directory with internal caches (of the VCS repository contents). It can be manually deleted to clear caches, they will be restored automatically as needed.

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 TeamCity Data Backup your data before making any changes.

Last modified: 20 April 2023