Backup cvs repository regularly

xiaoxiao2021-03-05  23

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 - %% JFOR / F "tokens = 1" %% i in ('TIME / T') Do SETTM = - %% ISET TM =% TM :: = -% Set DTT =% Logdate %% TM% CD / CD D: / CVSROOTRAR A CVSBACKUP_% DTT% .zip Project_1 Project_2 PRJ_3

转载请注明原文地址:https://www.9cbs.com/read-37295.html

New Post(0)