Microsoft KB Archive/176875

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Knowledge Base


INFO: The Primary Functions of Ssarc.exe and Ssrestor.exe

Article ID: 176875

Article Last Modified on 3/10/2005



APPLIES TO

  • Microsoft Visual SourceSafe 5.0 Standard Edition
  • Microsoft Visual SourceSafe 6.0 Standard Edition



This article was previously published under Q176875

SUMMARY

Earlier versions of the Visual SourceSafe did not provide a method for archiving parts of Visual SourceSafe databases. The only way to free up space was to destroy a file or project. Furthermore, there was no way to move information between databases. The archive utilities Ssarc.exe and Ssrestor.exe are separate command-line utilities that allow you to do the following:

  1. Archive a file or project out of the database into a special compressed file, then restore it later with its history, Share Links, and other information intact.
  2. Archive specific versions of a file (for example, all versions prior to 3.1), thus freeing up the space they use in the database, and then restore them to the database later.
  3. Archive a file, project or project tree from one database and restore it into a different database.


MORE INFORMATION

The archive utilities Ssarc.exe and Ssrestor.exe are separate command-line utilities that allow you to do the following:

  1. Archive a file or project out of the database into a special compressed file, then restore it later with its history, Share Links, and other information intact.

    A syntax example of this is:

          C:\>"C:\Program Files\DevStudio\Vss\Win32\SSARC" -d- -i- -sD:\VSSTest
          Archive.ssa $/ 
                            

    The quotes are only necessary if a space exists in the command line. The -d- option is an instruction not to delete the files being archived from the original database. The -i- option is an instruction for no input (accept all defaults). The -s switch specifies a path to the Srcsafe.ini and the data directory.

  2. Archive specific versions of a file (for example, all versions prior to 5), thus freeing up the space they use in the database, and then restore them to the database later.

    For example, if the files in the project are at least version 20 and you want to archive old versions that are no longer needed, the you could use the following syntax to accomplish this:

          C:\>"C:\Program Files\Devstudio\Vss\Win32\SSARC" -v10 -sD:\VSSTest
          Archive.ssa $/Queries/Test
                            

    Because the -d- and -i- options where not specified, the user will be prompted to answer the questions:

    Delete archived information from database?(Y/N)
    File C:\archive.ssa already exists. Overwrite?(Y/N)

    NOTE: In general, the archive utility is inclusive. That is, in the above example, the created archive (Archive.ssa) contains version 10 and everything before it. If you are using a label, and the label has a space in it, you must add an end quote to the entire option (for example, "-vThis One").

  3. Archive a file, project or project tree from one database and restore it into a different database. You could use the following syntax to restore the Archive.ssa (from example one above) from the VSSTest database to another database called VSSTest2:

         C:\>"C:\Program Files\Devstudio\Vss\Win32\SSRESTOR" -sD:\VSSTest2
         Archive.ssa $/Queries/Test
                            

    For additional information, please see the following articles in the Microsoft Knowledge Base:

    173387 PRB: Restoring an Archive of an Entire Database

    172157 PRB: Do Not Use SourceSafe When Running SSARC or SSRESTOR


REFERENCES

Visual SourceSafe, version 5.0, "Visual SourceSafe User's Guide," pages 217- 220

Keywords: kbinfo kbfaq KB176875