How to migrate the CVS repository from one machine to another?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux (RHEL) 6
  • CVS (Concurrent Versions System)

Issue

  • How can I migrate CVS repository to a new machine or location?
  • How to export a CVS repository from one machine to another?
  • Would it work if I transfer the whole CVSROOT then make it the CVSROOT of the new machine?

Resolution

Once you setup the CVS server on new system, do the following:

  • Copy the entire CVS repository from old server and put it on new system.
  • Run the following on the new cvs server.
# cvs -d new_directory_name init
  • Check whether you are able to access the new server’s repository.
  • Cut off the access to the old cvs repository.

  • Note: cvs init is careful to never overwrite any existing files in the repository, so no harm is done if you run cvs init on an already set-up repository. It may also be a good idea to set your CVSROOT environment variable first.

Diagnostic Steps

  • Component
  • cvs

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.