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

    Advertisements

    3 thoughts on “Migrating Sourcesafe database from one server to another in 5 steps

    1. At the end of the Archive process, it builds the Project list, then Saves the files. It reports the File Save as …done, but then produces a messge:
      Invalid access code (bad parameter).
      Any idea what that is from, or caused by please?

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s