TeamCity On-Premises 2024.07 Help

TeamCity Data Backup

About Data Backup in TeamCity

TeamCity provides several ways to back up its data:

Backing up Data

You can choose what data is backed up either in the UI or by adding the respective parameters in maintainDB.

TeamCity allows backing up the following data:

The following data is not included into backup:

  • Build artifacts (because of their size). These include build artifacts, internal NuGet feed packages, coverage report, finish build parameters, settings digest, and so on. If you need to back up the artifacts, save the contents of artifacts directories manually before restoring TeamCity data from backup.

  • For backup from the UI: running builds and build queue state. If you want to back up these, stop the TeamCity server and use the maintainDB tool.

  • TeamCity application manual customizations under <TeamCity Home>, including used server port number, which are stored in the <TeamCity Home>/conf/server.xml file.

  • TeamCity application logs (under <TeamCity Home>/logs).

  • Any manually created files under <TeamCity Data Directory> that do not fall into previously mentioned items.

The recommended approach is either to perform the manual backup process or run a backup from the UI regularly (for example, automated via REST API) with the "Basic" level — this will ensure backing up all important data except build artifacts and build logs.

Build artifacts and logs (if necessary) can be backed up manually by copying files under <TeamCity Data Directory>/system/artifacts.
If logs are selected for backup, TeamCity will search for them in all artifact directories currently specified on the server.

Note that for large production TeamCity installations, exporting and importing of data from/to the database may not be an optimal solution and maintaining database backup via replication might be a better option; for example, see the corresponding documentation for MySQL database.

Last modified: 31 January 2022