We use TFS 2017 CI / CD pipelines, and it works great. However, the TFS 2017 databases grow averaging around 1GB per day. One database grows from 10GB to 44GB as of 10/23/2018. The growth slowly becomes unsustainable for us. We already adjusted retention policy to minimum.
Researched and read at least 30 articles. Here are some relevant articles:
TFS tbl_Content started growing very fast after using VNext build
https://developercommunity.visualstudio.com/content/problem/63712/tfs-database-size.html
Here are what I did so far:
Reviewed again and again the retention policies, and reduced to minimum (1 day 1 copy). Adjusted 'Keep Deleted' for 10 days.
Uncheck the 'Retain Build' box in release definition
Run the scripts from three articles mentioned above, and found:
a) FileContainer, has 149176 number of files, 43GB, (34GB compressed)
b) FileContainerOwner: Build, 29GB
So the main cause of the growth is Build (and artifacts).
My question is how to shrink the database size down?
I look at the tabs 'History' and 'Deleted' under build definitions.
Some records in 'History' are locked with 'Retained by release'. I can click on records and delete. But it doesn't do anything. The records are still there.
All records in 'Deleted' are still there.
So back to my question again, how do I delete these records so that the space can be reclaimed?
Thanks.