How to Create a CVS Mirror: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(typo)
Line 7: Line 7:
  mkdir /cvs/cvsroot
  mkdir /cvs/cvsroot
=== Add that directory to your cvsd.conf ===
=== Add that directory to your cvsd.conf ===
  echo "Repo /cvsroot" >> /etc/cvsd/cvsd.conf
  echo "Repos /cvsroot" >> /etc/cvsd/cvsd.conf
 
=== Create an 'rsync-excludes' file to ignore history, users ===
=== Create an 'rsync-excludes' file to ignore history, users ===
  echo "CVSROOT/passwd" > /cvs/etc/rsync-excludes
  echo "CVSROOT/passwd" > /cvs/etc/rsync-excludes

Revision as of 20:25, 23 October 2007

THIS DOCUMENT IS A WORK IN PROGRESS

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

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.