When I installed TeamCity, I configured against a MySQL database, allowed the TeamCity data directory to be the default and configured TeamCity to run as a Windows Service as a set user (server and agent both run as "Local System"). It has been running pretty uninterrupted (with the occasional system restart) on Windows Server 2003 for just over a year now, accumulating approximately 8,000 run builds. Today we ran out of disk space (100GB hard disk) and I realized no cleanup policy had ever been configured. So I configured one and ran the cleanup, supposedly cleaning up the logs for some 7,600 builds and clearing up 85GB of disk space.
Instead, only 22GB of disk space were cleared out. Confused, I ran the free TreeSize program and discovered that there were TWELVE "BuildServer" directories. One at C:\BuildServer and the others: one in each user's directory in Documents and Settings. The one at C:\BuildServer is my installation directory, with a subdirectory TeamCity underneath it and, underneath that, temp, buildAgent, webapps, jre, logs, work, lib, devPackage, bin, license and conf.
Under each user directory in "Documents and Settings" is another directory called "BuildServer," and under that is "system", "config" and "plugins" and under "system" is "messages", "caches" and "artifacts". The "messages" directories under five of the users are HUGE ... one is 25GB, one is 15GB, one is 11GB, one is 10GB and the other is 7GB (all these sizes AFTER the cleanup). The other users all have relatively small "messages" directories, but they ARE still there for EVERY user (including the default system users).
My first question is, how in the world did this happen? How did my data directory get split across so many user accounts?
Now, I'm guessing I'm in a whole heap of trouble, because I need to be able to clean up this data. I'm also on version 5.0 and I'm thinking about upgrading to 6.x, so I know I'm going to need to back up my setup to upgrade. I don't mind if, just this once, I lose ALL of my history. That's not a problem for me. But...
My second questions is, what in the world do I back up (besides, obviously, my MySQL database)? I'm NOT okay with losing any of my build configurations or settings or users. I'm okay with losing my history, but that's it. So what do I backup?
Finally, I need to stop this from happening again. So...
My third question is, what recommendations do y'all have to keep such bizarre behavior from being repeated in the future?
Thanks in advance for the answers and advice,