MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

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

Chef Tutorials: Chef Infra Server & Chef Automate Backup and Restore

Chef Infra Server is backed up with chef-server-ctl backup and restored with chef-server-ctl restore. Chef Automate has its own commands, chef-automate backup create and chef-automate backup restore….

Read More

Best Azure DevOps Backup Tools in 2026

Source: Magnific Azure DevOps doesn’t back itself up. Deleted repositories, pipelines, and work items can vanish for good once the recovery window closes, and Microsoft’s own documentation…

Read More

Shell Bash Scripting: Assignment & Excercise – 7

This exercise uses Bash, rsync and SSH to copy a local file to a remote backup server, then sends an email when the copy finishes. Below the…

Read More

MySql Backup and Restore – A Complete Guide

MySQL logical backups are made with mysqldump, which writes a database out as a plain SQL file, and restored with the mysql client, which runs that file…

Read More

Import all MySQL databases at one time in seperate file for Backup

This page shows two ways to back up MySQL: with mysqldump –all-databases you get one large file, and with a shell loop you get one dump file…

Read More

Cpanel Cheatsheet

This cPanel cheatsheet shows how to run a full server backup from the command line with /usr/local/cpanel/bin/backup, confirm that it worked, and restore accounts from the result….

Read More
Subscribe
Notify of
guest
1 Comment
Newest
Oldest Most Voted
Puja kushwaha
Puja kushwaha
1 month ago

Archiving and restoring VSS data safely depends on more than creating an archive file. Teams should verify that the archive includes the required project history and metadata before relying on it. It is also wise to test the restore process in a separate location to avoid overwriting active work. Keeping dated backups and recording the commands used can make recovery much easier. A tested restore is far more reassuring than simply assuming the backup will work.

1
0
Would love your thoughts, please comment.x
()
x