Question
Is there a way to set up automatic cleanup of old TeamCity backups?
Answer
There is currently no automatic cleanup of backups.
The default location of the backup files is <TeamCity Data Directory>\backup (see Backup File Location and Format). It is possible to delete the old backup files manually from this directory; no additional steps are necessary.
The default format of the backup file name is TeamCity_Backup_<timestamp>.zip; the <timestamp> suffix is added in the YYYYMMDD_HHMMSS format. It may be used to identify backups to remove.
To automate the process, a script that cleans up old files can be created and run on a schedule.
Additional information
Deleting the backup files won't clear the backup history in the TeamCity UI (Administration > Backup > History).
Related feature requests: Rework backup history page, Ability to delete existing backups.
Comments
0 comments
Please sign in to leave a comment.