This article describes three common scenarios for moving Visual SourceSafeprojects or databases to a new location. The steps necessary tosuccessfully accomplish this are detailed in the MORE INFORMATION sectionbelow.
Scenario 1Moving the entire Visual SourceSafe server installation from one machine toanother.
Scenario 2Moving a project or projects from one database to another, while preservingthe project's history.
Scenario 3Moving only the DATA directory to a machine other than the VisualSourceSafe server. This scenario eliminates the need to modify clientsaccessing the database.
IMPORTANT: Whichever method you use, make sure to do a full backup of yourdata first.
The procedures within each scenario may vary depending on the version ofVisual SourceSafe you are running.
Moving the entire VSS server installation from one machine to another.
- Copy the entire <server>\VSS installation directory to the new server location.
- Make sure that the Visual SourceSafe clients can still access the data from the new location.
- Step 3 varies according to what version of Visual SourceSafe you are using:
For Visual SourceSafe 4.x clients:
For Visual SourceSafe 5.x or later clients:
- Locate the local copy of the Srcsafe.ini file (for example, <local drive>\vssclient\Srcsafe.ini) and open it in a text editor.
- Edit the line containing the #include statement so that it points to the new location of the server's Srcsafe.ini. For example:
#include \\oldserver\oldshare\vss\srcsafe.ini To:
- Open the Visual SourceSafe Explorer. Click OK if you get the following error:
File '\\oldserver\oldshare\srcsafe.ini' not found.
- From the Visual SourceSafe Login dialog box, click Browse.
- Click Browse from the Open SourceSafe Database dialog box.
- Type in the UNC path to the new location of the Visual SourceSafe server directory and open the srcsafe.ini. This will add a new entry in the Available Databases list for the newly located database.
- The old database reference can now be removed from this dialog box.
: Be sure to add the correct operating system level privileges tothe new server directory.
For additional information about required network privileges, please seethe following article in the Microsoft Knowledge Base:
INFO: Required Network Rights for the SourceSafe Directories
: If you have any shortcuts to this database, be sure to modify theshortcut Target on the client that pointed to ssadmin.exe on the oldserver.
Moving a project or projects from one database to another, while preservingthe project's history.NOTE
: This process is for Visual SourceSafe 5.0 or greater only.
Use the SSARC and SSRESTOR utilities included in Visual SourceSafe 5.0.With these utilities, you can archive projects, preserve their histories,and restore them to a new database.NOTE
: You must have SourceSafe Admin privileges to use these utilities. Formore information on the use of SSARC and SSRESTORE, see the VisualSourceSafe, version 5.0, "Visual SourceSafe User's Guide," Appendix B,pages 216-220 or under the SSAdmin Online Help topic "Basic AdministratorOperations".NOTE
: In order to restore a project successfully your archive must includethe latest versions all the files in the project. If you use the -v switchwith SSARC to archive off earlier versions of your files, you will not beable to restore that archive to a different database because it needs thelater versions.
For additional information, please see the following article in theMicrosoft Knowledge Base:
PRB: Restoring an Archive of an Entire Database
: Because the physical file names get renamed when you restore aproject to a new database, it may be necessary to reconnect projects thatare integrated with Visual SourceSafe. Please refer to the followingarticle in the Microsoft Knowledge Base for additional information:
How To Reconnecting a Visual C++ Project to Source Control
Moving only the DATA directory to a machine other than the VisualSourceSafe server:
- Copy only the <VSS server>\DATA directory to its new location.
- Edit the <VSS server>\srcsafe.ini file's data_path variable. For example:
data_path = data To:
data_path = \\<new server path>\data
Clients accessing this database do not need to be modified since theserver's Srcsafe.ini has not moved.
- Remove permissions for all users at the operating system level for the old Visual SourceSafe installation to prevent them from checking their work in and out of the wrong database.
- Once you are confident that the process is complete, delete the old Visual SourceSafe installation.
- If there are shadow folders, journal files, or web deploy locations set up in the old installation, you need to make sure that all the paths correctly reference the new server location. These settings are in the srcsafe.ini file on the server copy of Visual SourceSafe.
- When you start Visual SourceSafe from a client install, you might see the following errors:
Invalid DOS path: "<path>\scrsafe.ini" Indicates an incorrect path in the #include line of the client's srcsafe.ini.-or-
Invalid filename: "<path>\scrsafe.ini" Indicates insufficient operating system rights.