Setting up a CVS mirror with rsync
In situations where running FishEye on the same server as your CVS repository is not practical or possible, you can use the Linux utility 'rsync' to mirror the CVS repository contents onto the FishEye server.This is possible because CVS data is stored in a reasonably simple form in the file system.
We recommend this to achieve best performance when FishEye and CVS cannot be hosted on the same machine.
This workaround requires the ability to SSH into both machines. Linux and Mac OS X operating systems have rsync built in. For Windows, you will need to install rsync.
Diagram: A scenario where rsync is required
To set up a CVS mirror with rsync:
- You will need to set up a local directory on the FishEye server for the mirrored CVS content, ensuring that this server has ample disk space to store the current CVS database and any future space requirements.
- We will refer to the CVS instance (on your CVS Server, ) as <
CVS_HOME>and the new 'mirror directory' (on your FishEye server) as
Type the following
rsynccommand on the console at the command-line of the FishEye server:
rsync --backup <CVS_HOME> <MIRROR_HOME>
A real-world example would look something like this:
rsync --backup user@cvs_server:/CVS_server/path/to/instance /datastore/FishEye/cvs-mirror
- Schedule the rsync command to run regularly with a cron job. Running hourly is a good default interval. Under Windows, use a native task scheduler.
- With the cron job active, you will have established rsync to run an hourly comparison of the two directories and copy any changes across to the mirror directory as they occur. Note that running the rsync process will impact the FishEye server's performance (and also the CVS server's) to a certain degree.
- In the FishEye admin interface, add the local 'mirror directory' as a new CVS repository and run the initial scan. As this is local data on the same file system, FishEye's scanning of this data will be optimal.
- Adjust the FishEye Updater Full Scan period to one hour (the default is 15 minutes).
- The rsync configuration is now complete. Monitor the disk space on both servers to ensure there is adequate headroom for the mirroring process.
For more information on the syntax for rsync, visit the rsync home page.