Automatic Backup Of Microsoft Visual Source Safe (VSS)

Creating backup of Microsoft Visual Source Safe is not a big problem for any administrator but taking the backup automatically in the form of .ssa file might be a hard task to accomplish. Here I am going to share a simple batch script that will surely take a 100% working backup in the form of .ssa file.

Script is given as under;

@ECHO OFF
@TITLE Backing up source safe database 2005

REM Global variabeles:

REM      ssuser = A SourceSafe user with read rights.
REM      This user must exist in the /users
REM      directory of SourceSafe

REM     sspass = The password of the ssuser.
REM      Leave blank if no password is set.

SET ssuser=Admin
SET sspass=Admin’s Password

FOR /F “tokens=2-4 delims=/ ” %%i IN (‘date /t’) DO SET DATE=%%k-%%j-%%i
C:Program FilesMicrosoft Visual StudioVSSwin32ssarc.exe” -Y%ssuser%,%sspass% -sf:database name,f:database name -d- f:backup%DATE%.ssa $/

@ECHO Finished backups VSS 2005

vss

To Avoid any kind of inconvenience I am going to upload this script in the form of batch file. Please download the under given file. just change the User Name, Password, Path to VSS installation directory, Database Name and Backup path according to your needs.

[download id=”4″]

Use windows Task Scheduler to automatically run the batch file for automatic backup of Microsoft Visual Source Safe.

Note: Please use this script at your own risk. IT OPERATIONZ team will not be responsible for any kind of data loss. Its a very good idea to take the backup of your server manually before applying this script.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.