Discussion:
[rancid] Migrating from CVS to SVN on different server
Emre Bastuz
2007-07-31 08:29:51 UTC
Permalink
Hi,

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
/tmp/myoldcvs

- 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.

Cheers,

Emre
--
http://www.emre.de UIN: 561260
PGP Key ID: 0xAFAC77FD

I don't see why some people even HAVE cars. -- Calvin
Lance
2007-07-31 15:33:10 UTC
Permalink
Nice work.
-------- Original Message --------
Subject: [rancid] Migrating from CVS to SVN on different server
Date: Tue, July 31, 2007 1:29 am
Hi,
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
/tmp/myoldcvs
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
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.
Cheers,
Emre
--
http://www.emre.de UIN: 561260
PGP Key ID: 0xAFAC77FD
I don't see why some people even HAVE cars. -- Calvin
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Loading...