How to automatically backup SourceSafe?

For our source's security, an adminstrator of Microsoft Visual SourceSafe should do a backup daily or weekly at least. The backup process won't cost us a long time, but we prefer automatical backup for sure. Let's introduce how to implement a daily backup by making use of existing tools.

  • Tools
    • ssarc.exe. ssarc.exe is a backup tool offered by SoureSafe. It's in "win32" directory which is under the installation path of SouceSafe.
    • schtasks. In Windows Server 2003, schtasks allows an administrator creating, deleting, querying, configurng, running and stopping local or remote scheduled tasks in system. It is designed to replace at.exe.
  • Steps
    • Create a batch file names as "backup.bat" in "c:\backup\bin" directory;
    • Write the following commands into the file:
      1  @echo off
      2  @title Backing up SourceSafe databases
      3  set SsPath = C:\Program Files\Microsoft Visual Studio\VSS\win32\
      4  set BakPath = C:\backup\content\
      5  " %SsPath%ssarc.exe "  –d -   - s " Path to a SourceSafe Database "  –i -   - yadmin,password 
      6  –o@ " %BakPath%Backup-output(%DATE%).txt "   " %BakPath%Backup-Database(%DATE%).ssa "  $ /
      7  echo Finished backups
      8  @echo on

      Note:

      • SsPath designates the path to the "win32" directory.
      • BakPath appoints the path where backup files are preserved.
      • You should replace "Path to a SourceSafe Database" as the path to the "SrcSafe.ini" of a SourceSafe database.
      • Please replace "Password" as the administrator's password.
      • After a backup process, there will be two generated files under "c:\backup\content":
        Backup-output(2004-11-01).txt: the output file
        Backup-Database(2004-11-01).ssa: the backup file generated by SourceSafe.

        2004-11-01 appoints the date when the backup operation is carrying out.

    • Use schtasks to create a scheduled task.
      1 None.gif
      2 None.gifschtasks  / create  / RU system  / SC DAILY  / ST  12 : 00   / TN  " SourceSafe Backup "   / TR  " cmd /c C:\backup\bin\backup.bat "
      3 None.gif

      Note:

      • /RU system, run the command under "NT AUTHORITY\SYSTEM" account.
      • /SC DAILY, run the command one time a day. Valid values are MINUTE, HOURLY, DAILY, WEEKLY, MONTHLY, ONCE, ONSTART, ONLOGON, ONIDLE.
      • /ST 12:00 specifies the program will be started at 12:00.
      • /TN "SourceSafe Backup" specifies the name of the scheduled task.
      • /TR "cmd /c c:\backup\bin\backup.bat" specifies the program to be executed.

    • Congratulations, you have successfully created a scheduled task to implement the daily backup process. When type "schtasks" at command line, you can find "SourceSafe Backup" in the column called "Task Name".
  • References
posted on 2005-04-27 10:23  Lin 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/losingmyself/archive/2005/04/27/146145.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值