- Backup from the 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. Some limitations on the backed up data apply (see the related section below). This option is also available on upgrade in the maintenance screen - on the first start of a newer version of the TeamCity server.
- Backup via the
maintainDBcommand-line tool: Same as via the UI. To include all data, use the tool when the server is stopped.
- Manual backup: is suitable if you want to manage the backup procedure manually.
- You may need to back up the build agent's data only.
Build artifacts and logs (if necessary) can be backed up manually by copying files under
.BuildServer/system/artifacts and, prior to TeamCity 9.0,
.BuildServer/system/messages. See TeamCity Data Directory for details.
Since TeamCity 9.1, if If logs are selected for backup, TeamCity will be searching search for them in all artifact directories currently specified on the server.
Note that for large production TeamCity installations export , exporting and import importing 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.