Discussion:
[rancid] Moving a device between groups, and keeping the revisions
Steve Ousley
2008-08-06 18:41:34 UTC
Permalink
Hi Guys



Is this possible? I have just renamed a device as per the FAQ, and it has
successfully kept all the revision history etc.



We also have some firewalls that have been removed, but would like to keep
the data, is it possible to follow the same procedure for "renaming" a
device, and keeping the history as it is for moving between groups? For
instance if I did:



% su - rancid_user

% cd <LOCALSTATEDIR>

% echo " device_name:device_type:up" >> unused/router.db

% cp -p CVS/used/configs/ device_name,v \

CVS/unused/configs/device_name,v

% cd used/configs

% cvs update

% cd unused/configs

% cvs update



Personally I cannot see anything wrong with this (not sure about the need to
run the second command, but thought that since I'm changing both groups,
that would be wise), can anyone see any possible pitfalls with doing it this
way?



Steve Ousley - SO620-RIPE

Nuco Technologies Ltd

<mailto:***@host-it.co.uk> ***@host-it.co.uk

<http://www.nucotechnologies.com/> www.nucotechnologies.com

Tel. 0870 165 1300



Nuco Technologies Ltd is a company registered in England and Wales
with company number 04470751
john heasley
2008-08-06 18:54:25 UTC
Permalink
Post by Steve Ousley
Hi Guys
Is this possible? I have just renamed a device as per the FAQ, and it has
successfully kept all the revision history etc.
We also have some firewalls that have been removed, but would like to keep
the data, is it possible to follow the same procedure for "renaming" a
device, and keeping the history as it is for moving between groups? For
% su - rancid_user
% cd <LOCALSTATEDIR>
% echo " device_name:device_type:up" >> unused/router.db
you mean 'down'
Post by Steve Ousley
% cp -p CVS/used/configs/ device_name,v \
CVS/unused/configs/device_name,v
% cd used/configs
not necessary
Post by Steve Ousley
% cvs update
not necessary
Post by Steve Ousley
% cd unused/configs
% cvs update
Personally I cannot see anything wrong with this (not sure about the need to
run the second command, but thought that since I'm changing both groups,
that would be wise), can anyone see any possible pitfalls with doing it this
way?
Steve Ousley - SO620-RIPE
Nuco Technologies Ltd
<http://www.nucotechnologies.com/> www.nucotechnologies.com
Tel. 0870 165 1300
Nuco Technologies Ltd is a company registered in England and Wales
with company number 04470751
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Steve Ousley
2008-08-06 18:56:58 UTC
Permalink
Post by john heasley
Post by Steve Ousley
% echo " device_name:device_type:up" >> unused/router.db
you mean 'down'
Hmmm, I can see what you're saying there. That seems to be more sensible
since if the firewall is no longer there, then it wont be able to get the
updated config in the "unused" group will it!! Lol Thanks John!

Why am I soooooo stupid at times!!

Steve Ousley - SO620-RIPE
Nuco Technologies Ltd
***@host-it.co.uk
www.nucotechnologies.com
Tel. 0870 165 1300

Nuco Technologies Ltd is a company registered in England and Wales
with company number 04470751
Chris Gauthier
2008-08-06 19:09:11 UTC
Permalink
That should be added to the FAQ. That's useful info!!!

Chris Gauthier, CCNA
Network Administrator
Marion and Polks Schools Credit Union
***@mapscu.com
(503) 588-0181 x3401 Voice
(503) 779-1083 Fax

-----Original Message-----
From: rancid-discuss-***@shrubbery.net
[mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Steve Ousley
Sent: Wednesday, August 06, 2008 11:57 AM
To: rancid-***@shrubbery.net
Subject: [rancid] Re: Moving a device between groups,and keeping the
revisions
Post by john heasley
Post by Steve Ousley
% echo " device_name:device_type:up" >> unused/router.db
you mean 'down'
Hmmm, I can see what you're saying there. That seems to be more sensible
since if the firewall is no longer there, then it wont be able to get
the
updated config in the "unused" group will it!! Lol Thanks John!

Why am I soooooo stupid at times!!

Steve Ousley - SO620-RIPE
Nuco Technologies Ltd
***@host-it.co.uk
www.nucotechnologies.com
Tel. 0870 165 1300

Nuco Technologies Ltd is a company registered in England and Wales
with company number 04470751
Steve Ousley
2008-08-08 08:33:48 UTC
Permalink
-----Original Message-----
From: rancid-discuss-***@shrubbery.net
[mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Steve Ousley
Sent: Wednesday, August 06, 2008 11:57 AM
To: rancid-***@shrubbery.net
Subject: [rancid] Re: Moving a device between groups,and keeping the
revisions
Post by john heasley
Post by Steve Ousley
% echo " device_name:device_type:up" >> unused/router.db
you mean 'down'
OK, I have found a better solution than this. Since the device will no
longer be actually used, therefore rancid will not be able to get a
configuration from it, I have done some testing with deleting devices, which
works even better than marking it as "down" because it in fact moves the
configs to the Attic of CVS, which basically does what I wanted (get it out
of the main area for the configs).

This is all working great (other than the ProCurve, but we shall see if I go
any further with that one) and even better that I have now got a wrapper
script round Rancid that even gets the list of devices to backup from a
MySQL database. :) So I can, in fact, add firewalls to be backed up through
a web admin panel. :D

Steve Ousley - SO620-RIPE
Nuco Technologies Ltd
***@host-it.co.uk
www.nucotechnologies.com
Tel. 0870 165 1300

Nuco Technologies Ltd is a company registered in England and Wales
with company number 04470751

Loading...