Migrating Sourcesafe database from one server to another in 5 steps

UPDATE: The easiest way to move a VSS database to a new server is to copy the whole database in one shot. If your database is small this works like a charm. See this MS KB article for details. The only gotchas are :

  1. This involves copying the complete VSS folder over the network. This may be slooooow and the file copy may even fail suddenly for no reason.
  2. If the VSS db is real big then even winzip will stop at 65K files, so rule out that option if the no of files > 65K. Even winrar doesn’t work. I haven’t tried Lharc or ARJ yet.

—————————————————————————————-

Original Post 

If you have found this article, it means you haven’t had much luck trying to find how to migrate VSS from one machine to another. Also, many of you must have noticed that MS KB article http://support.microsoft.com/kb/q176875/ is bogus and the syntax for ssarc does not work. So, how do you actually move your VSS sourcesafe database ????

STEP 1:  Use SSARC.EXE to archive your existing database.
Here is the syntax which I got working for me after umpteen trial/errors :
ssarc “-s\\vssserver\vssfolder” d:\Archive.SSA $ 

1. Notice that -s is inside the quotes
2. $ means the whole VSS should be archived starting from root. You can specify sub branches too. eg. $/Projects or $/Project/Project1
3. Make sure you enter ‘N’ (NO) when ssarc asks you if you want to delete the existing database after it has been archived.

STEP 2: Run SSRESTOR.EXE to restore the database on the new server.
ssrestor “-s\\NewServer\VSS” d:\ArchivedProjects.ssa “$/PathYouWantToRestoreTo”

STEP 3: Copy existing users from your current VSS installation.
Copy VSS\Users folder, VSS\Users.txt file and Um.dat file to the new installation

STEP 4: Run Analyze -F “C:\Program Files\Microsoft Visual Studio\VSS\Data. This will re-generate the rights for all the users based on um.dat. Remember you just cannot simply copy rights.dat file to do this.

STEP 5: You can either change the current srcsafe.ini to point to the new database, so that developers don’t get a broken link. Or you can just shutdown the server and tell people to reload their projects from the new server.

Thats it. When you complete step 5….your VSS migration is complete !!!!

Further Reading:—————

Problems/Fixes for integrating VSS with Interdev:
http://www.codeproject.com/asp/VSS_and_VID.asp?df=100&forumid=136229&select=1313406&msg=1313406

User right setup for VSS:
http://support.microsoft.com/kb/131022/EN-US/

Use of http://codebetter.com/blogs/darrell.norton/archive/2004/04/15/11493.aspx vss binding remover on developer’s machines to get rid of .scc files

4 Responses

  1. Good article thanks

  2. thank you, thank you oh god thank you!!!!

  3. Nice work. Very handy peice of information.
    Needless to say i have a few hours of zipping ahead of me.

  4. Hi…
    I am trying to migrate database from one machine to another.
    I have difficulties running the ssarc.exe.
    It just does not run at all…..
    Are there any prerequisites that needs to be done before running ssarc.exe

    Also it would be very helpful.if you could elaborate more on step# 4…..

    I am completly new to servers….
    Help needed…

    Thanks

    Priya

Leave a Reply