How can I tack what action is deleting folders?

Answered

Hi, we use a common root checkout folder and it's been a problem for a while that folders would be deleted by TeamCity.

We thought we'd fixed this but it is still happening, so I'd like to find out which operation is causing it. I have found a couple of folders with:

.teamcity.clean.checkout.required

in - so I have a date and time when it went wrong, but I can't find anything in the logs around the timestamp of the file. In which log file can I find the info about folder deletions? 

Thanks

Richard

0
1 comment

Hello Richard,

There are several cases when TeamCity will remove a checkout directory or its contents:
1) by default, checkout directories will expire in 8 days of inactivity (e.g. no builds were using the checkout directory in question) - the details are available here: https://www.jetbrains.com/help/teamcity/build-checkout-directory.html#Automatic+Checkout+Directory+Cleaning
As per this link, you can amend this behavior to avoid directory expire on build configuration or agent basis.

If there is not enough disk space on the agent, directories could still be removed on a new build start.

2) there is also a number of cases when TeamCity could remove the contents of checkout directory: https://www.jetbrains.com/help/teamcity/clean-checkout.html#Automatic+Clean+Checkout, both manual and automatic ones.

Both cases appear as mostly INFO-level log entries in teamcity-agent.log files, so you may want to start with this one; please feel free to share the file via https://uploads.jetbrains.com so I will also try to check what happened around that time.

0

Please sign in to leave a comment.