How to Create a CVS Mirror: Difference between revisions
Jump to navigation
Jump to search
| Line 1: | Line 1: | ||
= How to Create a CVS Mirror = | = How to Create a CVS Mirror = | ||
=== Prerequisites === | === Prerequisites === | ||
* You must be using CVS patched with the [http://people.mozilla.org/~bhearsum | * You must be using CVS patched with the [http://people.mozilla.org/~bhearsum/cvs.noreadlocks.patch CVS no read locks patch]. | ||
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 [http://www.faqs.org/docs/Linux-mini/Secure-CVS-Pserver.html here]. | 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 [http://www.faqs.org/docs/Linux-mini/Secure-CVS-Pserver.html here]. | ||
Latest revision as of 12:23, 29 February 2012
How to Create a CVS Mirror
Prerequisites
- You must be using CVS patched with the CVS no read locks patch.
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-mirror.mozilla.org::mozilla /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-mirror.mozilla.org::mozilla /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.