Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm looking for a way to backup, save, version and restore configurations of Cisco network equipments.

I need to be able to automatically GET and PUSH configuration files on lots of routers and switches.

I'm looking for some kind of Linux alternative to Orion so I could :

  • Automatically get the configuration from a device when it's changed (triggered by a syslog)
  • Save every version of a configuration
  • Push a configuration on a single device
  • Push a configuration on a bunch of devices in a scripted way

So I had a look at what could appear to be a nice solution, and I found nothing meeting those criterias. It's very strange there isn't a Linux thing built for those needs.

Here's what I found :

  • Rancid is a nice script that can get configurations and save every version in a CVS or SVN repository
  • Syslog-ng could help me tell Rancid to check again the config of a device when a syslog is sent
  • CVS/SVN/Git/Whatever could achieve versionning and provide nice diffs
  • I could push configs with clogin (Rancid) but this isn't nice at all
  • I could push configs with TFTP but i'd have to script it (mostly for mass deployment).

Am I missing a tool providing functionnality I need? It's strange it doesn't exist on Linux.

Thanks for your help :)

share|improve this question

closed as off-topic by Bryan, mdpc, Falcon Momot, Jacob, Jenny D Jul 18 '13 at 8:45

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking product, service, or learning material recommendations are off-topic because they tend to become obsolete quickly. Instead, describe your situation and the specific problem you're trying to solve." – Bryan, mdpc, Falcon Momot, Jacob, Jenny D
If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Wanted to mention Rancid before reading the full post :) What you already mentioned already seems like the most sensible solution using tools that are already available. I have to say I'm curious too if there's some tool that can do that in a more simple way. –  icantbelieveitsnotlinux Jul 3 '13 at 18:26
    
Puppet supports pushing config to devices. –  Zoredache Jul 3 '13 at 18:27
    
Thank you both for your answers. @Zoredache : I've used Puppet for servers but I didn't know it also worked on Cisco devices. I'll give it a try and see if it's a great deal ;) –  mimipc Jul 3 '13 at 18:32
    
Good luck. I haven't actually tries it yet. –  Zoredache Jul 3 '13 at 18:55
    
It doesn't seem very stable and advanced for the moment... I don't know if it would fit in a production environnment... –  mimipc Jul 3 '13 at 19:21

1 Answer 1

This is what I found was by far the easiest to manage... though it is a bit rough, especially for people who dont like the CLI.

http://sourceforge.net/projects/cosi-nms/files/ciscocmd/

This is an expect script used to send commands to lots of cisco devices.

It allows you to pass in a file with the name of all your devices and the commands you want executed on the devices.

I just have it tftp configs to our central config tftp server nightly.

copy system:running-config tftp://mytftpserver/this-router-config

To restore you could just apply:

copy tftp://mytftpserver/this-router-config system:running-config

A simple example would be to have a file called "myrouters"

--- CUT --- 
#!/bin/sh
DATE=`date +%Y%m%d`
for THISHOST in `cat myrouters`
do
ciscocmd [auth params] -c "copy system:running-config tftp://mytftpserver/$THISHOST.$DATE"
done
--- CUT ---

This creates a config file called routerx.20130707

If you change

DATE=`date +%Y%m%d`

to

DATE=`date +%w`

you would just have a rolling 7 day window of configs routerx.1, routerx.2, .. routerx.7

Above is a very simplified example, but this is mostly what I do. I actually have a "config-backup.sh" and a "config-restore.sh".

Each script takes the params of a filename filled with the device names and the second parameter is the date in "YYYYMMDD". If it is a backup, it appends the date to the config filename. If it is a restore, it tells to devices to load "$HOST.$DATE".

I run the backups out of cron.

With this I can very easily restore anything just with SSH from my phone.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.