04-11-2022 11:32 PM
Hello,
Is there a way to do automated backup of the Catalyst 9800-40 WLAN controller?
On our Catalyst, Nexus switches and ISR routers we use RANCID, but I couldn't get it to work for the Catalyst 9800-40.
Regards,
Bernd
04-12-2022 12:06 AM
you can do a couple of ways : ( used rancid long back, after python its become easy now a days)
syntax is used below :
#copy running-config tftp://<server>/running-config.txt
You can use EEM Script to auto back.
you can use an external script to logging using SSH and do backup
04-13-2022 11:37 PM
Actually, I know how to do it via scripting, but I don't want to reinvent the wheel for every new device type, especially when the device is more expensive than my car.
04-14-2022 08:33 AM
Actually, I know how to do it via scripting, but I don't want to reinvent the wheel for every new device type, especially when the device is more expensive than my car.
not sure i understand this, what stopping you, if you know ?
are you looking script to provide here ?
04-18-2022 05:22 AM
We have backups running daily with rancid on 9800-80 which is logically identical to 9800-40.
Can you be more specific than "I couldn't get it to work"?
What isn't working?
What errors do you get?
What type/config are you using for them in rancid configuration? (ours is using rancid 3.13 clogin)
I didn't set it up myself but could check with the guy who did if you have specific details. He didn't report any problems getting the 9800's working - I think they just worked exactly like all the other IOS-XE boxes (mostly ASR1K), which should in turn be the same as ISR or Catalyst if they're running IOS-XE too, but crucially you don't mention whether they're IOS or IOS-XE.
04-18-2022 10:14 PM
We're also at rancid 3.13. Device type in router.db is cisco as the command syntax and prompt is pretty much the same as standard Catalyst switches.
The login via ssh using clogin works, but it does not send the "enable" command. It looks like expect does not get the prompt correctly, because after login the first prompt sent has two newlines. The Perl code for that module probably needs some tweaking.
[rancid@backuphost ~]$ clogin -d wlc1.example.com
...
expect: does "\r\n\r\nwlc1>" (spawn_id exp6) match regular expression ...
04-19-2022 02:54 AM
I'm no expert on rancid but we seem to be using a custom type of cisco-ios-backup in router.db and in rancid.types.conf that has:
# Cisco IOS device
cisco-ios-backup;script;rancid -t cisco-ios-backup
cisco-ios-backup;login;clogin
cisco-ios-backup;module;ios
cisco-ios-backup;inloop;ios::inloop
cisco-ios-backup;command;ios::WriteTerm;show running-config
04-18-2022 02:05 PM
mayb this will help you https://www.ciscolive.com/c/dam/r/ciscolive/latam/docs/2019/pdf/LTREWN-2030.pdf
04-18-2022 10:57 PM
You can do a kron job to automate the configuration backup.
kron occurrence Backup-Daily at 2:45 recurring
policy-list Backup-Daily
!
kron policy-list Backup-Daily
cli show run | redirect tftp://1.1.1.1/Config-Backup/sh run.txt
You can refer to the below post for more info on how to use variables such as hostname and time as the file name.
Solved: Kron with hostname - Cisco Community
04-19-2022 01:06 AM
Oh thanks. The IOS archive feature seems to do the job quite well. That was introduced in IOS 12.3 and can do versioning to a remote destination whenever one types "write memory". Seems to be even better solution than via kron as a backup is only made when there were changes.
archive log config logging enable path scp://user:password@1.2.3.4//mnt/backup/cisco/archive/$h-$t write-memory
https://nexp.com.ua/technologies/ios/cisco-ios-archive-feature-path-variables/
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide