If you want to change the <data_directory> path after installing TeamCity 6.5 on Windows, all you need to do is change the teamcity.data.path JVM property. On the default Tomcat server:
- Open a command prompt
- Execute C:\TeamCity\Bin\Tomcat6w.exe //ES//TeamCity
- In the configuration window that come up, change the teamcity.data.path property on the Java tab in the Java Option section to your desired location
- Save and Close
- Shutdown the TeamCity service(s)
- Move all the files that exist in the old datadir location to the new one
- Restart the TeamCity service(s)
When the server comes back up, all your existing artifacts should be available and new builds will use the new path.
It looks as if there is now an Environment variable in v7.1+ that can be set instead.
Some more documentation available here http://confluence.jetbrains.net/display/TCD7/TeamCity+Data+Directory