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.

(info) 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

Fisheye and CVS on separate machines

 

To set up a CVS mirror with rsync:

  1. 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.
  2. We will refer to the CVS instance (on your CVS Server, ) as <CVS_HOME> and the new 'mirror directory' (on your Fisheye server) as <MIRROR_HOME>.
  3. Type the following rsync command 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
    
  4. 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.
  5. 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.
  6. 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.
  7. Adjust the Fisheye Updater Full Scan period to one hour (the default is 15 minutes).
  8. 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.

Last modified on Mar 7, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.