Thursday, April 26, 2012

Automate backing up your Cisco routers/switches config to FTP server

After many years of working with Cisco IOS, I just discovered Kron, the *nix cron reincarnated.

Handy to automate configuration backup to an FTP server.

Bad news :

  1.  it does not deal with interactive style commands (expected)
  2. It does not work on PIX/ASA



 conf t  
 kron policy-list BCKP  
 cli sh running-config | redirect ftp://username:password@ftp_server_ip/hostname.cfg  
 exit  
 kron occurrence MONTHLY in 30:00:00 recurring  
 policy-list BCKP  
 end  
 wr mem  

Followers