Automatic Backup of sourcesafe

Source: Internet
Author: User
Tags schtasks

Microsoft Visual sourcesafe mentioned that administrators should back up sourcesafe every day or at least once a week.

1. Tools used
A. ssarc.exe. ssarc.exe is a backup tool provided by sourcesafe In the Win32 Directory of the sourcesafe installation path.
B. schtasks. schtasks allows administrators to create, delete, query, modify, run, and abort scheduled tasks on local or remote systems. Replace at.exe.

2. Steps for automatic sourcesafe backup:
A. Create a batch processing command file backup. BAT and store it in a certain location, such as C:/backup/bin.
B. Write the command to back up soucesafe in this batch command file. For example:

@ Echo off
@ Title backing up sourcesafe Databases
Set sspath = C:/program files/Microsoft Visual Studio/VSS/Win32/
Set bakpath = C:/backup/content/
"%Sspath%ssarc.exe"-d--s "path to a sourcesafe Database"-I-yadmin, password-o @ "%bakpath%backup-output(%date00000000.txt" "% bakpath % backup-database (% date % ). SSA "$/
Echo finished backups
@ Echo on

Note:
1) sspath specifies the Win32 directory path under the sourcesafe installation directory.
2) bakpath specifies the path for storing backup files
3) Replace "path to a sourcesafe Database" with the srcsafe. ini path of the sourcesafe database.
4) Replace "password" with the administrator password.
5) after each backup is completed, two files are generated in the C:/backup/content path:
A. backup-output(2004-11-01).txt: all output content of sourcesafe during Backup will be written to this file.
B. Backup-database (2004-11-01). Ssa: backup file generated by sourcesafe.
Note: "2004-11-01" is the current date when this backup operation is executed.
6) "$/" specifies to back up the entire database.
C. Use the schtasks command line tool to add scheduled tasks. As follows:

Schtasks/create/ru system/SC daily/ST 12:00/TN "sourcesafe backup"
/TR "CMD/C:/backup/bin/backup. Bat"

Note:
1)/ru system specifies to run this BACKUP command under the "nt authority/system" account.
2)/SC daily specifies that this command is run once a day. Optional values include minute, hourly, daily, weekly, monthly, once, onstart, onlogon, and onidle.
3) specify at/ST to run the BACKUP command.
4)/TN "sourcesafe backup" specifies that the name of the scheduled task is sourcesafe backup
5)/TR "CMD/C:/backup/bin/backup. Bat" specifies the command to run this scheduled task.
D. Now the task of creating daily automatic backup has been completed. Type "schtasks" in the command line to find "sourcesafe backup" in the "Task Name" column!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.