cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3813
Views
6
Helpful
9
Replies

Automated backup of Catalyst 9800-40 WLAN controller?

Network Diver
Level 1
Level 1

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

9 Replies 9

balaji.bandi
Hall of Fame
Hall of Fame

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

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

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.

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 ?

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Rich R
VIP
VIP

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.

 

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 ...

 

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

 

Arshad Safrulla
VIP Alumni
VIP Alumni

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

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://www.techrepublic.com/article/use-the-cisco-ios-archive-command-to-archive-your-routers-configuration/

https://nexp.com.ua/technologies/ios/cisco-ios-archive-feature-path-variables/ 

Review Cisco Networking for a $25 gift card