TeamCity Data Directory is the directory on the file system used by TeamCity server to store configuration settings, build results and current operation files. The directory is the primary storage for all the configuration settings and holds the data critical to the TeamCity installation. (See also notes on backup for the description of the data stored in the directory and the database).
The location of the directory is set using TEAMCITY_DATA_PATH environment variable. If the variable is not set, the TeamCity Data Directory is assumed to be located in the user's home directory (e.g. it is $HOME/.BuildServer under Linux and C:\Users\<user_name>\.BuildServer) under Windows.
The currently used data directory location can be seen on Administration | Global Settings page for a running TeamCity server instance, or in logs/teamcity-server.log file (look for "TeamCity data directory:" line on the server startup).
Please note that in this documentation and other TeamCity materials the directory is often referred to as .BuildServer. If you have another name for it, please replace ".BuildServer" with the actual name.
TeamCity Windows installer configures the TeamCity data directory during the installation steps. The default path suggested for the directory is:
To change the location of the TeamCity Data Directory:
You will need to restart the server after making changes to the setting.
Note that the system directory stores all the artifacts and build logs 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.
Please note that TeamCity assumes reliable and persistent read/write access to TeamCity Data Directory and can malfunction if data directory becomes inaccessible. This malfunctions can affect TeamCity functioning while the directory is unavailable and may also corrupt data of the currently running builds. Still under rare circumstances the data stored it the directory can be corrupted and be partially lost.
We do not recommend to place the entire TeamCity data directory to a remote/network folder. If single local disk cannot store all the data, consider placing the data directory on a local disk and mapping .BuildServer/system/artifacts to a larger disk with the help of OS-provided filesystem links.
config subdirectory of TeamCity Data Directory contains the configuration of your TeamCity projects, and the system subdirectory contains build logs, artifacts, and database files (if internal database (HSQLDB) is used which is default). You can also review information on Manual Backup and Restore to get more understanding on what data is stored in the database and what on the file system.
The files in the config directory can be edited manually (unless explicitly noted). They can even be edited without stopping the server. TeamCity monitors these files for changes and rereads them automatically when modifications or new files 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.
Many configuration files meant for manual editing use the following convention:
If you plan to modify configuration manually 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.
See also related comment in our issue tracker on build configurations move between TeamCity servers.
Skip to end of metadata Go to start of metadata