[cvsnt] repos back up

Dave anonymous at no.isp
Thu May 15 20:41:48 BST 2003


I don't know admin from Adam, but I've taken it upon myself to backup our
repository here.  Here is what I do/I've done:

1) wrote a batch file that stops the cvsnt service, copies the repository,
restarts the service, then renames the backup.  It could also copy it to
networked storage, but it currently doesn't.

2) set a scheduled task that runs the batch file every weeknight at 10pm.
See Start->Programs->Accessories->System Tools->Scheduled Tasks.

3) every week, I zip the backups and burn to CD-R.

4) that's it.

Here is the batch file (cvsbackup.bat):

    FOR /F "TOKENS=2-4 DELIMS=/ " %%F IN ('DATE /T') DO (SET
MYDATE=%%F-%%G-%%H)
    net stop cvs
    xcopy "D:\Data Files\CVS\cvsrepo" "D:\Data Files\CVS\cvsbackup" /Q /S /C
/H /R /O /Y /I
    net start cvs
    ren "cvsbackup" "cvsbackup %MYDATE%"

Line 1 creates an environment variable that is the current date punctuated
with hyphens.

Line 2 stops the service so no one commits while it's backing up.

Line 3 copies the repository to a backup directory with all the correct
ownerships, protections, etc.

Line 4 restarts the service.

Line 5 renames the backup repository to include the date in its name.

That's it.  Good luck.

-- 
Dave
"stirkus ersu venete"


"Zaid, Mahmoud" <Zaidm at Pragmatics.com> wrote in message
news:mailman.94.1053009239.22761.cvsnt at cvsnt.org...
> Greetings to all,
> I am assigned the cvs admin role for the first time so please I need some
> help in understanding the admin role. I don't seem to find any online or
> hard copy as a reference for cvs admin! some documents here and there. I
> guess the first part as an admin I need to back up the repository. Can
> someone kindly layout the steps to do that?
> Thank you for your help in advance.
>
> Regards,
> Mahmoud Zaid
> 703 761-4033 x232
>



More information about the cvsnt mailing list