Discussion:
[rancid] Is there any way to show uncommitted changes
David Krider
2010-03-23 18:49:05 UTC
Permalink
I had hacked up my own version of Rancid without even knowing it (with
expect, but no RCS). My version backed up both the `show config' and
`show running' commands, and then did a diff between them, and sent any
result in email for review. It was intended to show uncommitted changes
to the gear. My boss sent me a link to Rancid, and I've just gotten it
running and backing up several switches and a couple routers. Is there
any way to get it to show me the difference between the running and
permanent configs? I get the feeling there is, but I can't find it.

Thanks,
dk
john heasley
2010-03-23 18:56:09 UTC
Permalink
Post by David Krider
I had hacked up my own version of Rancid without even knowing it (with
expect, but no RCS). My version backed up both the `show config' and
`show running' commands, and then did a diff between them, and sent any
result in email for review. It was intended to show uncommitted changes
to the gear. My boss sent me a link to Rancid, and I've just gotten it
running and backing up several switches and a couple routers. Is there
any way to get it to show me the difference between the running and
permanent configs? I get the feeling there is, but I can't find it.
no; write a script that takes router.db and uses *login -c 'command' to
save the config at some regular interval, such as daily.
Chris Gauthier
2010-03-23 20:08:11 UTC
Permalink
I would be very interested in such a script! I just don't have time to write it.

Chris G.


-----Original Message-----
From: rancid-discuss-***@shrubbery.net [mailto:rancid-discuss-***@shrubbery.net] On Behalf Of john heasley
Sent: Tuesday, March 23, 2010 11:56 AM
To: David Krider
Cc: rancid-***@shrubbery.net
Subject: [rancid] Re: Is there any way to show uncommitted changes
Post by David Krider
I had hacked up my own version of Rancid without even knowing it (with
expect, but no RCS). My version backed up both the `show config' and
`show running' commands, and then did a diff between them, and sent any
result in email for review. It was intended to show uncommitted changes
to the gear. My boss sent me a link to Rancid, and I've just gotten it
running and backing up several switches and a couple routers. Is there
any way to get it to show me the difference between the running and
permanent configs? I get the feeling there is, but I can't find it.
no; write a script that takes router.db and uses *login -c 'command' to
save the config at some regular interval, such as daily.
john heasley
2010-03-24 23:24:14 UTC
Permalink
Post by Chris Gauthier
I would be very interested in such a script! I just don't have time to write it.
for r in `cut -d: -f 1-3 */router.db | grep -i ':cisco:up' | cut -d: -f 1`
do
clogin -c 'write mem' $r
end
Post by Chris Gauthier
Chris G.
-----Original Message-----
Sent: Tuesday, March 23, 2010 11:56 AM
To: David Krider
Subject: [rancid] Re: Is there any way to show uncommitted changes
Post by David Krider
I had hacked up my own version of Rancid without even knowing it (with
expect, but no RCS). My version backed up both the `show config' and
`show running' commands, and then did a diff between them, and sent any
result in email for review. It was intended to show uncommitted changes
to the gear. My boss sent me a link to Rancid, and I've just gotten it
running and backing up several switches and a couple routers. Is there
any way to get it to show me the difference between the running and
permanent configs? I get the feeling there is, but I can't find it.
no; write a script that takes router.db and uses *login -c 'command' to
save the config at some regular interval, such as daily.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
David Krider
2010-03-25 01:43:23 UTC
Permalink
Post by john heasley
Post by Chris Gauthier
I would be very interested in such a script! I just don't have time to write it.
for r in `cut -d: -f 1-3 */router.db | grep -i ':cisco:up' | cut -d: -f 1`
do
clogin -c 'write mem' $r
end
Not to be obtuse, but what commands does rancid actually run normally? I
know it's at least "show run", but there's some extra there. I've tried
tracing the scripts, but I can't sort it out. I want to generate exactly
the same output as it's getting during a normal run (except to "show
conf"), so I can diff with the configs it's saving to the config
directory, with as little differences as possible.

dk
james machado
2010-04-09 18:10:56 UTC
Permalink
David,

look in the file <home dir>/bin/rancid and in there you will find an
array declaration @commandtable. this array shows the commands that
rancid will run and the function used to parse the output prior to
committing it to CVS/SVN.

james
Post by David Krider
Post by john heasley
I would be very interested in such a script!  I just don't have time to write it.
for r in `cut -d: -f 1-3 */router.db | grep -i ':cisco:up' | cut -d: -f 1`
do
clogin -c 'write mem' $r
end
Not to be obtuse, but what commands does rancid actually run normally? I
know it's at least "show run", but there's some extra there. I've tried
tracing the scripts, but I can't sort it out. I want to generate exactly
the same output as it's getting during a normal run (except to "show
conf"), so I can diff with the configs it's saving to the config
directory, with as little differences as possible.
dk
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Continue reading on narkive:
Loading...