nanog mailing list archives
Re: Network configuration archiving
From: "R. Scott Evans" <nanog () rsle net>
Date: Fri, 25 Oct 2013 14:17:24 -0400
On 10/25/13 07:59, Matthew Newton wrote:
For the last ~8 years we've used a very simple in-house bash script that uses SNMP to tell the switch to write its config using tftp, and then does a wr mem. It then checks the configs into a subversion repository and e-mails out any diffs. One criteria we had was that our config backup system wasn't going to get CLI access to any routers if at all possible, and this turned out to be a good alternative. I can't think of many times when it's failed to work; occasionally the odd switch might not respond, but that's rare. The only possible issue being that we're 100% Cisco, so I don't know if other vendors support the same MIBs. I'll try and post the script (250 lines) somewhere if anyone's interested. Cheers, Matthew
I have a very similar home-grown script, however I did need a mix of tftp and telnet/CLI depending on the particular platform (for instance recently I couldn't get the tftp approach to work with remote devices running IOS-XR or IOS-XE).
An overly simplified telnet module might look like:
-----------------------
#!/bin/sh
login=""
passwd=""
router=""
timeout=1 # increase this for larger configs
(sleep 1;
echo $login; sleep 1;
echo $passwd; sleep 1;
echo term leng 0; sleep 1;
echo "sh run"; sleep $timeout;
echo exit; sleep 1;
) | telnet $router 2>&1
-----------------------
-Scott
Current thread:
- Re: Network configuration archiving, (continued)
- Re: Network configuration archiving Kenneth McRae (Oct 24)
- RE: Network configuration archiving Nolan Rollo (Oct 24)
- Re: Network configuration archiving Tammy Firefly (Oct 24)
- Re: Network configuration archiving Kenneth McRae (Oct 24)
- Re: Network configuration archiving Jon Lewis (Oct 24)
- Re: Network configuration archiving Christopher Rogers (Oct 24)
- Re: Network configuration archiving Kenneth McRae (Oct 24)
- Re: Network configuration archiving Job Snijders (Oct 25)
- Re: Network configuration archiving Matthew Newton (Oct 25)
- Re: Network configuration archiving R. Scott Evans (Oct 25)
- Re: Network configuration archiving Michael Kehoe (Oct 25)
- Re: Network configuration archiving Ricky Beam (Oct 25)
- RE: Network configuration archiving Jamie Bowden (Oct 28)
- Re: Network configuration archiving Jared Mauch (Oct 25)
