How to Create a CVS Mirror

From MozillaWiki
Jump to: navigation, search

How to Create a CVS Mirror


This document describes how to create a mirror of the Mozilla CVS repository. It is assumed that you already have a working CVS pserver setup. A decent tutorial for doing this can be found here.

Create a directory for the repository

mkdir /cvs/cvsroot

Add that directory to your cvsd.conf

echo "Repos /cvsroot" >> /etc/cvsd/cvsd.conf

You'll also need to add the "-R" argument to the CvsArgs entry in your cvsd.conf. This will enable the no-read-locks support.

Create an 'rsync-excludes' file to ignore history, users

echo "CVSROOT/passwd" > /cvs/etc/rsync-excludes
echo "CVSROOT/writers" >> /cvs/etc/rsync-excludes
echo "CVSROOT/history" >> /cvs/etc/rsync-excludes
echo "CVSROOT/history*" >> /cvs/etc/rsync-excludes

Copy this script that will perform an rsync of the Mozilla CVS

rsync -q -az --delete --delay-updates --exclude-from=/cvs/etc/rsync-excludes /cvs/cvsroot

Note: If your version of rsync does not support '--delay-updates' you can use this script as an alternative. However, your CVS server will be unavailable while updates are being performed.

/etc/init.d/cvsd stop
rsync -q -az --delete --exclude-from=/cvs/etc/rsync-excludes /cvs/cvsroot
/etc/init.d/cvsd start

If you want to continually update your mirror you should create a cron job to do so. Otherwise you can run the above script at any time to do it manually.