write mem if running-config and startup-config are different?
Matt Wilson
mwilson at northwestern.edu
Tue May 17 15:13:47 UTC 2005
At 11:25 PM +0200 5/16/05, Arnold Nipper wrote:
>On 16.05.2005 23:00 john heasley wrote
>>> >Is anyone using rancid to notice that running-config
>>>and >startup-config are different, and if so, issue a write mem
>>>command? >(or something else to address such an issue?) Would you
>>>be willing >to share what you've done?
>>>>
>>>
>>>Why don't you run "write memory" every time you pick up the config?
>>>
>>
>>or periodically, somethign like
>> for r in `cat */router.db | egrep -i '(cisco|cat5)' | cut -f1 -d: `; do
>> clogin -c 'write mem' $r
>> done
>
>Be aware that this will fail as both cisco and cat5 expect
>confirmation of the write command. You have to add 2-3 new lines to
>make it work (2 for cisco and 3 for cat5 iirc)
Hi-
Thanks for the replies -- our experience seems to indicate that doing
a wr mem will often make NVRAM look different even if the configs are
the same. We want to avoid lots of extraneous NVRAM diffs on every
rancid run. We're still looking into why this seems to be happening
for us. Running a separate script to wr mem against all devices
sounds good though -- thanks for the help!
Regarding sending newlines
clogin -c 'wr mem' $router
seems to work without problems at our site (rancid v2.3.1)
-Matt
More information about the Rancid-discuss
mailing list