Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

SSARC and SSRESTOR in Visual SourceSafe: Safe Archive and Restore Guide

Originally published on 2009-10-06; fully revised and updated.

This guide explains how to use Microsoft Visual SourceSafe command-line utilities SSARC (archive) and SSRESTOR (restore). It is aimed at teams maintaining legacy VSS databases and shows safer backup-first workflows, option behavior, and practical commands. For historical context, see the original post.

SSARC Utility and SSRESTOR Utility

What SSARC and SSRESTOR are for

In Visual SourceSafe, these utilities support command-line archive and recovery operations outside the GUI wizards in VSS Administrator.

  • SSARC: Archives files/projects (or selected historical versions). It can optionally delete archived items from the database.
  • SSRESTOR: Restores items from an archive file back into a VSS database.
  • Both utilities: Support standard VSS options like credentials, non-interactive mode, and output redirection.

Recommended archive and restore workflow

For operational safety, run archive jobs in non-destructive mode first, validate the archive, and only then consider deletion-oriented runs.

flowchart TD
    A[Choose project scope] --> B[Run SSARC with no delete]
    B --> C[Validate archive with list or test]
    C --> D{Need to remove items from VSS}
    D -- No --> E[Keep archive as backup]
    D -- Yes --> F[Run SSARC with delete mode]
    E --> G[Store archive securely]
    F --> G
    G --> H[Use SSRESTOR for recovery]

SSARC vs SSRESTOR at a glance

UtilityPrimary purposeInputCan change VSS contentsNotable behavior from source
SSARCCreate archive files from VSS files/projects or version rangesVSS path(s) such as $/ProjectYes, if -D is usedArchive file size over 2 GB is described as unsupported in the source
SSRESTORRestore from existing archive files.ssa archive + optional target items/projectYes, writes restored items into the destination databaseRestore fails on duplicate project/file names; includes list and test modes

Syntax reference

SSARC syntax

ssarc [-C][-D][-I-][-O][-S][-V][-X][-Y] <archive file to create> <files/projects to archive>Code language: HTML, XML (xml)

SSRESTOR syntax

ssrestor [-C][-I-][-L][-O][-P<project>][-S][-T][-X][-Y] <archive file to restore> [files/projects]Code language: CSS (css)

Notation reminder: values in <...> are required arguments, [...] are optional, and options with spaces in their values should be wrapped in quotes.

Important options and operational impact

OptionUtilityEffectWhen to use
-DSSARCDeletes archived items from the VSS databaseData-pruning jobs only, after validated backups
-D-SSARCDo not delete archived items (or avoid prompt-driven deletion)Normal backup runs
-I-BothNo interactive promptingScheduled/automated runs
-V...SSARCArchive up to a version/date/label (inclusive behavior is described in source)History slicing before cleanup
-L / -LASSRESTORList archive contents without restoringPre-restore verification
-TSSRESTORTest archive for corruption without restoreIntegrity check before recovery
-P<project>SSRESTORRestore under a specified destination projectRelocation or cross-database restore
-X / -X-BothControls deleted-item handling/selectionWhen deleted and undeleted items share names
-Y<user>,<pwd>BothCredentials for command executionRequired for scripted runs

Practical command examples

Create a full archive without deleting anything

SSARC -d- -yadmin,password archive.ssa $/

Backs up the full default VSS tree into archive.ssa and leaves database contents unchanged.

Archive using a label selector and write a log

SSARC -d- "-vlProduction Release" -yadmin,password -olog.txt archive.ssa $/TestCode language: JavaScript (javascript)

Archives versions associated with the label expression and writes command output to log.txt.

Archive deleted items and remove them from VSS

SSARC -d -x -yadmin,password archive.ssa "$/Project Global Domination" $/OtherProjectCode language: JavaScript (javascript)

This is a destructive operation because -d is used. Validate archive recoverability before using this mode.

List and test an archive before restore

SSRESTOR -la -yadmin,password archive.ssa $/
SSRESTOR -t -yadmin,password archive.ssa

The first command lists archive contents; the second tests the archive file without restoring data.

Restore to another project path or database context

SSRESTOR "-p$/Test 2" -sD:\newfolder\ -yadmin,password backup.ssa $/TestCode language: JavaScript (javascript)

Restores $/Test from backup.ssa into $/Test 2 using an alternate SourceSafe configuration path.

Automation example for scheduled backups

The following Windows batch example runs SSARC in non-interactive, non-destructive mode and generates a dated archive filename.

@echo off
set SSARC_EXE=C:\Program Files\Microsoft Visual Studio\Common\VSS\win32\ssarc.exe
set ARCHIVE_DIR=C:\Backups
set VSS_USER=admin
set VSS_PASS=password

for /f %%i in ('powershell -NoProfile -Command "Get-Date -Format yyyyMMdd"') do set DATESTAMP=%%i

"%SSARC_EXE%" -i- -d- -y%VSS_USER%,%VSS_PASS% "%ARCHIVE_DIR%\ARCHIVE-%DATESTAMP%.ssa" $/Code language: CSS (css)

Best practices for legacy VSS maintenance

  • Default to -D- for routine backups; use -D only with explicit cleanup intent.
  • Validate archives before recovery with SSRESTOR -L/-LA and SSRESTOR -T.
  • If you see "Only ADMIN can run this utility," verify admin credentials and -Y<user>,<pwd> formatting.
  • Quote options that include spaces, for example "-p$/Project A" or "-vlProduction Release".
  • The source states a 2 GB archive/restore limit; split very large trees into subprojects if needed.
  • Keep archive files off-host and retain logs for audit and rollback.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Team Foundation Server 2015 Installation Guide (SQL Express + Update 3)

Install Team Foundation Server 2015 using the original Microsoft download paths, with clear guidance for online, offline, and ISO-based setup. This revised guide also includes an installation workflow, command example, and practical pitfalls to avoid.

Read More

How to Access a Running Docker Container Shell: docker exec vs docker attach

Need a shell inside a running container that is already in detached mode? This updated guide shows the correct workflow, compares docker exec and docker attach, and explains when SSH does and does not make sense.

Read More

Host Your Own NuGet Feed: Local Source vs NuGet.Server vs NuGetGallery

Learn how to host a private NuGet feed using three practical approaches: a local folder source, NuGet.Server, and NuGetGallery. This revised guide includes setup steps, command examples, and a workflow diagram to help you choose the right model.

Read More

Publish NuGet Packages to NuGet.org: CLI Steps, Workflow, and CI Example

Learn how to publish a NuGet package to NuGet.org using either nuget.exe or the dotnet CLI. This revised guide includes a workflow diagram, command comparison, and a CI-friendly example.

Read More

How to Create NuGet Packages with nuget.exe (Assembly, .nuspec, and .csproj Methods)

Learn three practical ways to build NuGet packages using nuget.exe: from an existing assembly, from a convention-based folder layout, or directly from a Visual Studio project. This guide includes commands, folder conventions, token behavior, and common pitfalls.

Read More

Virtualization in DevOps: Using Vagrant, Docker, and Cloud Platforms Together

This guide explains how VM-based workflows, containers, and cloud platforms complement each other in DevOps. It includes a practical workflow, trade-off table, and command examples for day-to-day use.

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x