installing VSS

I am new to VSS and I want to do the Following.

1 . I have VSS installed on my machine already. I am deciding to move VSS Server on a different machine.
2 . I installed VSS on brand new machine.
3 . I copied all the Files from Older machine to new one.

When I installed VSS it complained about VSS DB already exists (because I copied ASP Files from other machine which had VSS database already). so i updated it.

Now I want to Create a new Database for my WebSites. I Can create Database successfully but when I try to open it it says

"Invalid Dos Path C:\VB\users\ss.ini"

so I cant connect to it, cant add users or files to it.

Please Advise

LVL 23
Saqib KhanSenior DeveloperAsked:
Who is Participating?
JohnBPriceConnect With a Mentor Commented:
As long as you back up at least the srcsafe.ini, users.txt, and the data, users, and temp directories, you can restore your complete database, including the project structure, simply by restoring all the directories/files to the same location they were at.  You would not have to add projects back one by one.

A source safe "database" is contained within 3 directories, data, users, and temp, which are identified by a srcsafe.ini file and a users.txt file which points to individual users preference files (ss.ini files, normally stored within the "users" directory).  Normally, a complete set (srcsafe.ini, users.txt file and these 3 directories) is installed in the same place as VSS was installed to, creating the "default" database.  Because it is the default, many applications try to find the srcsafe.ini file by looking in the directory where VSS was installed (which they get from the registry).  That is why it appears "all clients connect to that database".  Some applications, like the VB 6.0 IDE, will let you choose a different VSS database than the default.  Some applications, like IIS 5.0, don't let you choose, but always try to open the default local VSS database.  The srcsafe.ini file is what really ties everything together, so you can trick any app that opens the default database by editing the default srcsafe.ini to point to a different databases data, users, and temp directories, such as on a different server.  For example, I have source safe on my server named DellServer, but I also have a srcsafe.ini on my local machine in the default location that looks like this, so that IIS will also use my server installed source safe database and not the local database.

Data_Path = \\dellserver\C$\Program Files\Microsoft Visual Studio\VSS\data
Temp_Path = \\dellserver\C$\Program Files\Microsoft Visual Studio\VSS\temp
Users_Path = \\dellserver\C$\Program Files\Microsoft Visual Studio\VSS\users
Users_Txt = \\dellserver\C$\Program Files\Microsoft Visual Studio\VSS\users.txt

The path to the server is probably different than the path on your local machine, so if you copied (and overwrote) srcsafe.ini file, it is messed up.  You can manually correct the paths (there are only 3), but I'm not sure is simply coying the data files is safe.  A cleaner way is to remove and install VSS fresh on the server.  Then use SS Admin to backup your local database and restore it to the server database.
Saqib KhanSenior DeveloperAuthor Commented:
> A cleaner way is to remove and install VSS fresh on the server

thats what I did.

but the FILEs that i copied had VSS files in it. New Server never had VSS before. after installing it its still pointing to old VSS source file.
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

I meant you should not copy VSS files to your server.  Instead do a SSAdmin backup of your client and SSAdmin restore to the server.

None the less, take a look at srssafe.ini on the server.  It should point to the data, user, and temp directories on the server by relative path names or full UNC path names, e.g. my server srcsafe.ini contains

; The two important paths used by SourceSafe.
Data_Path = data
Temp_Path = temp

; This tells admin where to put personal directories for new users.
Users_Path = users

From my client, I open Source Safe,  choose open source safe database, and browse to the server's "SrcSafe.ini" file.  When my client tries to open the data/temp/users files, it is using the path to the srcsafe.ini plus the relative path, for example if my servers srcsafe.ini is at \\dellserver\C$\Program Files\Microsoft Visual Studio\VSS\srssafe.ini, then it will look for my data/temp/users folders as \\dellserver\C$\Program Files\Microsoft Visual Studio\VSS\data\...

If your servers srssafe.ini has absolute local paths, e.g. "C:\Whatever\data", then it might work from the server, but when you try to access it on the client, the client tries to find "C:\Whatever\data", which probably doesn't exist on the client's C: drive.
You also mentioned "ASP files".  Note that if you are using IIS to interact with SourceSafe, it will ALWAYS use the srcsafe.ini on the IIS machine.  As far as I know, there is no way to tell IIS 5.0 that the source safe database is elsewhere.  There fore if your actual VSS database is not on your IIS machine (as when you run IIS on your client for development), you must create a local srcsafe.ini file that points to the server via UNC paths AND run IIS (at least all the virtual directories that use Source Safe) with a domain account and not the local anonymous IUSR_<Machine> because the IUSR_Machine account doesn't have rights to access the source safe files stored on a different server.
Saqib KhanSenior DeveloperAuthor Commented:
Well, Somehow its working now, after reinstalling.

Should I back up VSS database on Daily basis?
if my Computer Crashes (having VSS database file in it). what would I do.

I back up my servers daily, including all the VSS directories.  A straight file restore to the same machine in the same file structure is fine, I believe your difficulties stemmed from being a different machine with a different file structure.  You must backup/restore the entire directory though, especially the data directory.

If your VSS contains a lot of stuff, especially binaries, you should periodically do a ssadmin backup of the database and then purge old versions of files so that the VSS data directory doesn't get too big (and slow).
Saqib KhanSenior DeveloperAuthor Commented:
JohnBPrice , Thanks for your Comments.

Maybe I did not explain  my question or maybe I dont really understand VSS in details.
I do Backup of my files every Night. But my Question was when you install VSS it generates a VSS Database and all clients connect to that Database.
so if that machine Crashes I dont want to Add Projects one by one again I just want to populate that database right away by supplying that backup  file (VSS DB) or something.

Saqib KhanSenior DeveloperAuthor Commented:
Basicly a SourceSafe Database Contains what?
Maybe Whatever Files we Checked out?

if I take srcsafe.ini, users.txt, and the data, users, and temp directories to any other computer "OFF THE NETWORK" and point to the above Files, I will be able to see files from the Source Safe Database?

Thanks for the Pts.

A source safe database contains in the data directory
-The latest version of every file that was ever checked in.
-Past versions of every file that was ever checked in more than once (stored as deltas for text type files, full files for binary)
-The labels and comments attached to file versions.
-The project structure including which files are included in which projects (shared files are stored once, but may be included in multiple projects).
-Pinned versions for projects (you pin a shared file in a project to force it to use a specific version of that file)
-The check out status of files (to whom, what machine, and what directory)
-probably other stuff

Almost all of this is stored in some non-disclosed file format, except that files are indexed with some hash function, so that no single folder gets too big if all your file names start with 'frm' or something.  You can poke around these files (don't change them), you'll find that some appear to be your files simply renamed, these are probably the latest versions.  Some are clearly encoded in some way by Source Safe, I would guess these are the back-version deltas.

In the users directory, the ss.ini contains (amongst other things) what working directory you have set for each project.

Yes, you can take the srcsafe.ini, users.text, the data, users, and temp directories to another machine (that has the same version of SS installed), fix up the entries in srcsafe.ini and open it as a source safe database.  What you can't do (without figuring out in much more detail how the files are stored), is delete old versions of files, add/remove files, or basically change anything in the "database" without using Source Safe or SSAdmin.

If you are heavily into using source safe, the admin help guide has a lot of secrets not normally seen, such as the command line interface for automating nightly builds, how to set up a shadow directory, also useful for nightly builds and inter-project references like components, how to use automatic string replacement for automatically updating a files header section with the check in comments, user, date, etc.
Saqib KhanSenior DeveloperAuthor Commented:
Thanks a lot John.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.