[rancid] Migrating from CVS to SVN on different server

Emre Bastuz info at emre.de
Tue Jul 31 08:29:51 UTC 2007


I have migrated rancid data from one machine to another and
while I was at it switched from CVS to SVN.

For those who need to do something similar I´d like to outline
the steps taken.

- I put the CVS data from rancid´s old installation into at tar.gz,
  moved it over to the new machine an placed it in a folder

- I used cvs2svn to convert the data from group "router":
  cvs2svn --trunk-only --encoding=utf8 -s /var/svn/rancid-router /tmp/myoldcvs/CVS/router

- as the svn data already exists now, the command 'rancid-cvs' can not be
  used to initialize the repository and create further data, needed by
  rancid. You´ll have to create the needed files manually/copy them from the
  former installation:

  BASEDIR=/var/lib/rancid; export BASEDIR
  OLDDIR=/tmp/myoldcvs; export OLDDIR
  mkdir $BASEDIR/router
  cd $BASEDIR/router
  svn checkout file:///var/svn/rancid-router/trunk .
  cp $OLDDIR/router/routers.all $BASEDIR/router/
  cp $OLDDIR/router/routers.down $BASEDIR/router/
  cp $OLDDIR/router/routers.failed $BASEDIR/router/
  cp $OLDDIR/router/routers.up $BASEDIR/router/
  cp $OLDDIR/router/router.db $BASEDIR/router/
  chown -R rancid:rancid $BASEDIR
  chown -R rancid /var/svn/rancid-router/

- I edited rancid.conf to point to the SVN folder and "activated" SVN
  RCSSYS=svn; export RCSSYS
  CVSROOT=/var/svn/rancid-router; export CVSROOT
By the way: for debugging purposes I edited the first line of
the script 'control_rancid' to include the "-x" option for
/bin/sh: #! /bin/sh -x

This will add a lot of information to the rancid logfile.

Hope this helps.



http://www.emre.de                        UIN: 561260

I don't see why some people even HAVE cars. -- Calvin

More information about the Rancid-discuss mailing list