| You are viewing documentation of TeamCity 6.x, which is not the most recent released version of TeamCity. Please refer to the listing to choose another version. |
|
In TeamCity you can back up server data, restore it, and migrate between different databases using single maintainDB.bat|sh utility. For the data backup, TeamCity also provides web UI part, in the Administration section of TeamCity web UI. maintainDB utility is located in the <TeamCity Home>/bin directory. This section covers: Backing up DataTeamCity allows backing up the following data:
Backup of the following data is not supported:
By default, if you run maintainDB utility with no optional parameters, build logs and personal changes will be omitted in the backup. The default directory for the backup files is the <TeamCity Data Directory>\backup.
Default format of the backup file name is TeamCity_Backup_<timestamp>.zip; the <timestamp> suffix is added in the 'YYYYMMDD_HHMMSS' format. Performing TeamCity Data Backup with maintainDB Utility
To create data backup file, from the command line start maintainDB utility with the backup command: To specify type of data to include in the backup file, use the following options:
Specifying different combinations of the above options, you can control the content of the backup file. For example, to create backup with all supported types of data, run maintainDB Usage Examples for Data BackupTo create backup file with custom name, run maintainDB with -F or --backup-file option and specify desired backup file name without extension: The above command will result in creating new zip-file with specified name in the default backup directory. To add timestamp suffix to the custom filename, add -M or --timestamp option: To create backup file in the custom directory, run maintainDB with -A option:
Installation and Upgrade: Setting up an External Database | Migrating to an External Database |