Discussion:
[rancid] Renaming a device - keeping the changelog
Steve Ousley
2010-01-12 16:11:46 UTC
Permalink
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.

Cheers.

Steve Ousley - SO620-RIPE
Nuco Technologies Ltd
***@host-it.co.uk<mailto:***@host-it.co.uk>
www.nucotechnologies.com<http://www.nucotechnologies.com/>
Tel. 0844 745 1300
Skype: nucotech-support

Nuco Technologies Ltd is a company registered in England and Wales
with company number 04470751
Jethro R Binks
2010-01-12 16:31:28 UTC
Permalink
Post by Steve Ousley
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 \
CVS/GROUP/configs/new_device_name,v
cd GROUP
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
john heasley
2010-01-12 19:01:30 UTC
Permalink
Post by Jethro R Binks
Post by Steve Ousley
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
cd /usr/local/var/rancid
echo "new_device_name:device_type:up" >> GROUP/router.db
cp -p CVS/GROUP/configs/old_device_name,v \
CVS/GROUP/configs/new_device_name,v
cd GROUP
rm configs/old_device_name
cvs -d /usr/local/var/rancid/CVS update .
cp -p CVS/GROUP/configs/old_device_name,v \
CVS/GROUP/configs/new_device_name,v
cd group
cvs update
then update the router.db and let rancid do the delete.
Post by Jethro R Binks
(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
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Loading...