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.

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
| Utility | Primary purpose | Input | Can change VSS contents | Notable behavior from source |
|---|---|---|---|---|
| SSARC | Create archive files from VSS files/projects or version ranges | VSS path(s) such as $/Project | Yes, if -D is used | Archive file size over 2 GB is described as unsupported in the source |
| SSRESTOR | Restore from existing archive files | .ssa archive + optional target items/project | Yes, writes restored items into the destination database | Restore 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
| Option | Utility | Effect | When to use |
|---|---|---|---|
-D | SSARC | Deletes archived items from the VSS database | Data-pruning jobs only, after validated backups |
-D- | SSARC | Do not delete archived items (or avoid prompt-driven deletion) | Normal backup runs |
-I- | Both | No interactive prompting | Scheduled/automated runs |
-V... | SSARC | Archive up to a version/date/label (inclusive behavior is described in source) | History slicing before cleanup |
-L / -LA | SSRESTOR | List archive contents without restoring | Pre-restore verification |
-T | SSRESTOR | Test archive for corruption without restore | Integrity check before recovery |
-P<project> | SSRESTOR | Restore under a specified destination project | Relocation or cross-database restore |
-X / -X- | Both | Controls deleted-item handling/selection | When deleted and undeleted items share names |
-Y<user>,<pwd> | Both | Credentials for command execution | Required 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-Donly with explicit cleanup intent. - Validate archives before recovery with
SSRESTOR -L/-LAandSSRESTOR -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.
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.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals