Question
Is it possible to set up a TeamCity server backup to be executed automatically on a schedule?
Answer
The following options are available for scheduling TeamCity backups:
- Starting backup using TeamCity REST API. The script making the request may be scheduled via any scheduler. There are limitations to the backed-up data. Additional actions may be required for a complete backup. Running builds and build queue state may not be included in this backup, as these can be backed up only when the TeamCity server is stopped.
- Creating a backup using the maintainDB command-line tool. The script using this tool may also be scheduled with any scheduler. The same limitations to the backed-up data apply. However, maintainDB doesn't require a running server for the backup. So it is possible to shut down the TeamCity server before the backup to include all builds.
The recommended approach is to perform the backup via UI or REST API regularly with the "Basic" level. This will ensure that all important data, except build artifacts and build logs, is backed up and will not lead to noticeable downtime.
Comments
0 comments
Please sign in to leave a comment.