Mailing List Archive

Re-IPing some switches.
I’d like to maintain the config history for some of my switches, but not sure it’s possible. Can I set the switches as down in rancid, re-ip them, then mv the switch config directories to the new IP address and turn them back up? I’m guessing it’s probably not that easy…

Thanks.
Chris
Re: Re-IPing some switches. [ In reply to ]
What I tend to do is update the references to the files in rancid, then
"git/svn/cvs mv" the file, and then when rancid runs at the top of the hour
it updated the new file and you retain all the history

On Thu, 27 May 2021, 17:52 Chris Davis, <Chris.Davis@principia.edu> wrote:

> I’d like to maintain the config history for some of my switches, but not
> sure it’s possible. Can I set the switches as down in rancid, re-ip them,
> then mv the switch config directories to the new IP address and turn them
> back up? I’m guessing it’s probably not that easy…
>
>
>
> Thanks.
>
> Chris
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss@www.shrubbery.net
> https://www.shrubbery.net/mailman/listinfo/rancid-discuss
>
Re: Re-IPing some switches. [ In reply to ]
I don’t use git. Just downloaded a million years ago and compiled, and just keep updating manually. I don’t know much about using git. Aware of it, but don’t use it at all.

Chris

From: Craig Hopkins <c.o.hopkins@gmail.com>
Date: Thursday, May 27, 2021 at 11:56 AM
To: Chris Davis <Chris.Davis@principia.edu>
Cc: "rancid-discuss@shrubbery.net" <rancid-discuss@shrubbery.net>
Subject: Re: [rancid] Re-IPing some switches.

Caution: This message originated outside of Principia. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
________________________________
What I tend to do is update the references to the files in rancid, then "git/svn/cvs mv" the file, and then when rancid runs at the top of the hour it updated the new file and you retain all the history

On Thu, 27 May 2021, 17:52 Chris Davis, <Chris.Davis@principia.edu<mailto:Chris.Davis@principia.edu>> wrote:
I’d like to maintain the config history for some of my switches, but not sure it’s possible. Can I set the switches as down in rancid, re-ip them, then mv the switch config directories to the new IP address and turn them back up? I’m guessing it’s probably not that easy…

Thanks.
Chris
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@www.shrubbery.net<mailto:Rancid-discuss@www.shrubbery.net>
https://www.shrubbery.net/mailman/listinfo/rancid-discuss<https://urldefense.com/v3/__https:/www.shrubbery.net/mailman/listinfo/rancid-discuss__;!!J_0i3noFoQ!7Cj9gdwrYUBXGsmGJcTa0Gsxh98OSbJehpD1H-Z-i2LE5CTNBIfw4MbJSVDjc0siiVyKow$>
Re: Re-IPing some switches. [ In reply to ]
Thu, May 27, 2021 at 04:57:51PM +0000, Chris Davis:
> I don’t use git. Just downloaded a million years ago and compiled, and just keep updating manually. I don’t know much about using git. Aware of it, but don’t use it at all.

yeah, afaik, cvs does not have a mv. you can do it manually; see

https://stackoverflow.com/questions/133721/move-a-file-in-cvs-without-resetting-the-revision-number/133827

make sure rancid does not run while you are fiddling.

something like
su - rancid
. /path/to/rancid.conf
set -o noclobber
echo $$ > $TMPDIR/.<groupname>.run.lock
cd $CVSROOT/<groupname>
cp -p hostname,v newhostname,v
cd $BASEDIR/<groupname>
cvs update
vi router.db # replace the entry with new
rm $TMPDIR/.<groupname>.run.lock

there are scripts to convert cvs to svn or git.

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@www.shrubbery.net
https://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: Re-IPing some switches. [ In reply to ]
Are you using hostnames for the switches in the router.db file? If so, there is no worry, change the IP, update dns or host file entries as needed and all will be fine.
If rancid is configured to access the switches via IP, then you will have to perform some of the magic the others have offered in their suggestions.

From: Rancid-discuss <rancid-discuss-bounces@www.shrubbery.net> On Behalf Of Chris Davis
Sent: Thursday, May 27, 2021 12:52 PM
To: rancid-discuss@shrubbery.net
Subject: [rancid] Re-IPing some switches.

This message originated Externally. Use proper judgement and caution with attachments, links, or responses.

I’d like to maintain the config history for some of my switches, but not sure it’s possible. Can I set the switches as down in rancid, re-ip them, then mv the switch config directories to the new IP address and turn them back up? I’m guessing it’s probably not that easy…

Thanks.
Chris

Aaron Williamson
Principal Systems Engineer
Precisely.com

p +1 317-572-1849<br />m +1 (317) 213-0894<br />ATTENTION: -----
The information contained in this message (including any files transmitted with this message) may contain proprietary, trade secret or other confidential and/or legally privileged information. Any pricing information contained in this message or in any files transmitted with this message is always confidential and cannot be shared with any third parties without prior written approval from Syncsort. This message is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any use, disclosure, copying or distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please immediately notify the sender and/or Syncsort and destroy all copies of this message in your possession, custody or control.