Backup cvs repository regularly

Last modified at $Date: 2005/04/11 07:07:54 $

Backup cvs repository regularly

Regular backup is important for cvs administrator. We can use some simple tech to make our life easier. We are going to use simple m$-dos batch file to do backup thing for cvs server run on m$ windows2000 platform.

This batch file is especially for windows english version. m$-dos date command's output is different from the one on chinese version. Destination zip file is located in cvsroot directory. We only uncompress project directory not the entire cvsroot directory, there is no need to backup the whole cvsroot directory.

The following is the content of m$-dos batch file. Format of the backup file is zip. We can easily change to use another uncompress tool like tar in Linux. Zip file name's suffix is current date when backup separated by _

for /f "Tokens=2-4 Delims=/ " %%i in ('date /t') do  set LOGDATE=%%k-%%i-%%j

for /f "Tokens=1" %%i in ('time /t') do set tm=-%%i
set tm=%tm::=-%
set dtt=%LOGDATE%%tm%


cd /
cd d:/cvsroot

rar a cvsbackup_%dtt%.zip project_1 project_2 prj_3
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值