This section describes backup options available for TeamCity 6.x and above. If you need to perform backup of earlier versions, please refer to the corresponding section in an appropriate version of Documentation.
TeamCity provides several ways to back up its data:
Creating Backup from TeamCity Web UI: an action in the web UI (can also be triggered via REST API) to create a backup while the server is running. It is recommended for regular maintenance backups. Restore is possible via the maintainDB console tool. Some limitations on the backed up data apply. This option is also available on upgrade in the maintenance screen - on the first start of a newer version of the TeamCity server.
We strongly urge you to make the backup of TeamCity data before upgrading. Note that TeamCity server does not support downgrading.
The recommended approach is either to perform backup described under Manual Backup and Restore or run backup from the Creating Backup from TeamCity Web UI regularly (e.g. automated via REST API) with the level "Basic" - 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 .BuildServer/system/artifacts and .BuildServer/system/messages. See TeamCity Data Directory for details on what is stored in the directories.
Note that for large production TeamCity installations export and import of the data from/to the database may not be an optimal solution and maintaining database backup via replication might be a better option. e.g. see the corresponding documentation for MySQL database.