A few weeks ago I blogged some scripts that allow you to analyze and back up your VSS installation. But I omitted a restoration script. π
"C:Program FilesMicrosoft Visual StudioCommonVSSwin32ssrestor.exe" -yadmin,password "C:my_backup.ssa" $/my_project
-yadmin,password is the logon information, e.g. logonname “admin” password “password”. You should use the correct login info for your VSS installation. If you omit the -y parameter you’ll get prompted for login info. C:my_backup.ssa is the file created when you backed up your sourcesafe database. And $/my_project is the name of a root-level project in VSS. You can also specify $/ to restore all projects, but it won’t work if you already have projects in VSS.
You can use the restoration script to restore your VSS database in case of loss, or to migrate it to a different machine entirely. One trick when migrating a VSS installation is to change the srcsafe.ini of the old machine to a one-liner:
#include \new_vss_servervss_sharesrcsafe.ini
That means that when users try to connect to the old sourcesafe (via the client or tools such as Visual Studio) they’ll be silently “redirected” to the new sourcesafe installation. So you won’t have to run around & make everyone re-point their tools to the new installation right away. But…you should still eventually update your projects to use the new server, since eventually the old one will go offline (or something). To switch your Visual Studio projects to the new location, look to the VS menu. Go to File->Source Control->Change Source Control. For each project in the menu:
- click browse again
- navigate to \new_vss_servervss_sharesrcsafe.ini
- click open
- click OK
Oh, and I was having some weirdness with blogger….wasn’t finding my FTP server. Wacky. π