Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
I'm playing around with the configmanager. But can't figure out how (what) i need to do to take a backup.
I create a group, and add my devices in there. In the logfile, i see that the scripts are running, but i can't find any results.
Does anyone knows which script i must use to backup a standard cisco switch/router (running config)?
Or how i can put the logs in a higher level so i can see more of the results? Today, only a line with script runs is in there (see below some tries)...
2011-03-10 15:17:12 CFG MANAGER: DEBUG: exec_background(scp ronsse@15.0.0.1:flash:/config.text /data/15.0.0.1scp.txt) for following hosts:15.0.0.1
brononi wrote:Hey,
I'm playing around with the configmanager. But can't figure out how (what) i need to do to take a backup.
I create a group, and add my devices in there. In the logfile, i see that the scripts are running, but i can't find any results.
Does anyone knows which script i must use to backup a standard cisco switch/router (running config)?
Or how i can put the logs in a higher level so i can see more of the results? Today, only a line with script runs is in there (see below some tries)...
First answer:
which system you have (linux, windows)?
do you have ssh on the switchs?
with linux and ssh on the switchs 'sh-ios-config.sh' function well. Notice1: you have to install expect. notice2: if you do not allow (default linux) the allowed key could change and you exchange a switch with an other, the script will send a event to the syslog because the administrator must removed the old key. You can activate a e-mail if the syslog receive such warning.
PS: you can start/test also manually these scripts.
It's a linux machine, and i'm able to connect from the machine with ssh towards the routers.
I've just installed expect. This wasn't installed. So i did this with 'yum install expect'.
What's the manual way to test these scripts? :$
Some details of the logs:
2011-03-15 13:50:59 CFG MANAGER: Update setting to sql db (import syslog host,import syslog user,import syslog pwd) -> result=ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,ERROR,
2011-03-15 13:50:18 CFG MANAGER: DEBUG: exec_background(/var/www/html/plugins/configmanager/scripts/ssh-ios-config.sh username *** 10.128.146.254 /var/www/html/plugins/configmanager/cfgmng_logfile.txt /var/www/html/plugins/configmanager/temp/data/20110315/10.128.146.254.txt show run) for following hosts:10.128.146.254
/var/www/html/plugins/configmanager/scripts/ssh-ios-config.sh: line 3: /var/www/html/plugins/configmanager/temp/data/20110315/10.128.146.254.txt: No such file or directory
2011-03-15 13:50:17 CFG MANAGER: DEBUG: exec_background(/var/www/html/plugins/configmanager/scripts/ssh-ios-config.sh username *** 10.128.140.254 /var/www/html/plugins/configmanager/cfgmng_logfile.txt /var/www/html/plugins/configmanager/temp/data/20110315/10.128.140.254.txt show run) for following hosts:10.128.140.254
/var/www/html/plugins/configmanager/scripts/ssh-ios-config.sh: line 3: /var/www/html/plugins/configmanager/temp/data/20110315/10.128.140.254.txt: No such file or directory
When i see this log (cfgmng_logfile.txt), i've got the impression that the destination files aren't there (or aren't created)?
Also, when i check our firewall logs, i don't see any traffic passing by. When i do a ssh connection towards this, i see it. So i suppose the application (script) isn't starting the connection...
When i created the file myself (and chmod 777 on it), the backup is taken properly.
After going a bit more in depth, he can create the files, but not the directories (dateformat).
When i change the script a bit (remove the / between the date & hostname), it works:
%g%/scripts/ssh-ios-config.sh %u% %w% %n% %g%/cfgmng_logfile.txt %g%/temp/data/%y%%m%%d%%n%.txt show run
Next step, figuring out to tell him that he can create the directory himself...
brononi wrote:Okay,
When i created the file myself (and chmod 777 on it), the backup is taken properly.
After going a bit more in depth, he can create the files, but not the directories (dateformat).
When i change the script a bit (remove the / between the date & hostname), it works:
%g%/scripts/ssh-ios-config.sh %u% %w% %n% %g%/cfgmng_logfile.txt %g%/temp/data/%y%%m%%d%%n%.txt show run
Next step, figuring out to tell him that he can create the directory himself...
Do you have fill up the parameters of the config of configmanager
insert for example in the parameter "pre command":