TeamCity Data Directory

Skip to end of metadata
Go to start of metadata
You are viewing documentation of TeamCity 3.x, which is not the most recent released version of TeamCity. Please refer to the listing to choose another version.
Documentation Index

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

Note that the system directory stores all the artifacts of the builds in the history and can be quite large (see Clean-Up Policy to configure how many builds are kept).

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
      • 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 "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.
    • 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.
    • 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 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:

concepts concepts Delete
data data Delete
directory directory Delete
system system Delete
configuration configuration Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.