I have at last got round to moving the location of the WSS sites used by our TFS server from the WSS instance running on our TFS Application Tier (AT) to our main 64bit MOSS 2007 server farm. A job I have been putting off for ages.
I decided that there was nothing on the TFS WSS sites of importance, other than documents (which I could easily copy) so decided to create new WSS sites as opposed to trying a backup and restore model.
The first step is to make sure the templates for the WSS sites I needed were present on the MOSS farm. These are installed on the TFS AT WSS as part of the main install, you also get the option to run the MSI on a separate MOSS farm. Historically this has been a problem for us as the TFS installer did not support 64Bit WSS, however a power toy has been released for just the job. The only problem was when I ran this I got an error
'No templates for Windows SharePoint Services Extensions were uploaded....'
This pointed to a WSS config issue, but the MOSS farm seemed to be working fine. Instead of fiddling with this I just decided to install the templates manually.
Now we use eScrum, but I thought I would be good and install the two MSF standard ones as well. These are stored as .STP files. I copied these files to the MOSS web server (you can find them on the AT using search) and ran the stsadm command as below:
Stsadm.exe" -o addtemplate -filename MSFAgile3.0.stp
Stsadm.exe" -o addtemplate -filename MSFFormal3.0.stp
Stsadm.exe" -o addtemplate -filename escrum.stp
Update: Note that the -title in the commands above is case sensitive, it must be eScrum not escrum.
Next I decided that I did not want the TFS sites to be created on the default /sites managed path. So we created a new managed path of /tfsprojects. (Central admin, application management, define managed paths)
Once the templates were installed and the managed path created I made sure all was OK by creating a new site collection (using the Central admin, application management, create site collection).
It is worth doing this to make sure you used the correct STP files - there is a potential issue here if you upgraded from TFS 2005 in the past you may have stray WSS 2.0 format STP files hanging around you need version 3.0 ones.
The TFS AT needs to be reconfigured to point at the new farm. This is done from the AT using the TfsAdminUtil command. tfsadminutil configureconnections will list the current settings.
You need to edit the SharepointUri, SharepointSitesUri, SharepointAdminUri and SharepointUnc to point at the MOSS farm as opposed to the WSS on the TFS AT. The general form to change these is:
tfsadminutil configureconnections /SharepointUri:http://server1.domain.com
Once all the changes are made Visual Studio can be loaded to get at Team Explorer. Now in theory the new setting should be picked up, but you might need to delete the local cache (c:\documents and settings\[username]\local settings\application data\microsoft\team foundation).
Creating New Team Project
At this point I think it is good idea to try to create a new team project and make sure the Sharepoint site is created with the correct template and rights.
Fixing up old Team projects
If all is working you can now fix up the older projects. Basically all that is required is that a site exists with the correct uri e.g,
You create this site collection using the MOSS Central admin, just like the test site created previously after the templates were installed.
Once this created you should be able to right click on the team project in team explorer and open the portal site. Now you might hit rights problems here depending who you are logged in as. It is a good idea to check that the newly created site has the correct permissions set i.e make user the TFS project contributors have equivalent rights set on the newly created WSS site.
The final step is to copy any documents over from the old site (on the AT) to the new site on the MOSS farm.
Once this is all done you system should be using the MOSS server farm without any problems.