[rancid] Re: Renaming a device - keeping the changelog

Jethro R Binks jethro.binks at strath.ac.uk
Tue Jan 12 16:31:28 UTC 2010

On Tue, 12 Jan 2010, Steve Ousley wrote:

> OK, I'm sure i've seen this somewhere, either on the mailing list, or on 
> the site, but am unable to find it anywhere.
> What I have: a device has now moved from one location to another, and 
> it's A record (which Rancid uses) has changed.  I want to rename the 
> device in Rancid, but keep the changelogs.  Can anyone point me in the 
> direction of how to do this please.

I have this note preserved, but I can't remember if I have actually used 
this procedure or whether I kept it "just in case":

cd /usr/local/var/rancid
echo "new_device_name:device_type:up" >> GROUP/router.db
cp -p CVS/GROUP/configs/old_device_name,v \
rm configs/old_device_name
cvs -d /usr/local/var/rancid/CVS update .

(The above instructions need some further testing; you may also be able to 
do (cd group; cvs update) too rather than the longer version)

Then let rancid run and learn the new device (don't forget to modify 
.clogin too). Once it is complete, remove the old name from router.db and 
rancid will clean up the data for the earlier name.

.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
Jethro R Binks
Computing Officer, IT Services, University Of Strathclyde, Glasgow, UK

More information about the Rancid-discuss mailing list