Use TeamCity Backup
- Create a backup including everything. (You can skip the option to backup build logs is you are moving the artifacts, see below).
- Install a new TeamCity server of the same version that you are already runnningrunning. Ensure that:
- the appropriate environment is configured (see the notes below)
- the server uses its own TeamCity Data Directory and its own database (check
config/database.propertiesin the Data Directory)
- Restore the backup.
- Move the artifacts (these are not included into the backup) by moving the content of
<TeamCity Data Directory>/system/artifactsdirectory from the old location to the new one. Since the artifacts can be large in the size, this can take a lot of time, so plan accordingly.
- Perform the necessary environment transfer.
The new server won't get build artifacts and some other data. If you need them, you will need to copy appropriate directories (e.g. the entire "artifacts" directory) from .BuildServer/system from the In order to ensure complete server transfer, it is recommended to copy the entire content of the TeamCity Data Directory from the original to the copied server. Make sure to finish copying over the artifacts It is recommended to complete the copying before starting the new server.
If you need to join the data with already existing setdata on the new server, there is a dedicated feature to move projects with most of the associated data from one server to another: Projects Import.