SlideShare a Scribd company logo
Page 1 of 5
Automate Cisco Switch Configuration Backups with KRON
Created by. Travis Kench - travis@tkcomputersolutions.com - 1/29/2014
Project: Find a free solution to automate Cisco switch configuration backups.
Solution: Cisco KRON via CLI
The Cisco KRON is a command scheduler utility. It allows you to schedule commands to run
once, at system startup, or at specified dates and times.
I have tested and verified that this works on the following switch models:
 2901 (VOIP Phone Gateway)
 2911 (VOIP Phone Gateway)
 2921 (VOIP Phone Gateway)
 2951 (VOIP Phone Gateway)
 2960s
 3560s
 3750s
I have verified that the KRON utility isn’t available on the following switch models:
 2950s
 3500s
Step 1: Check to see if your switch’s clock is set to the correct time.
Switch> en
Switch# sh clock
Step 2: If the switch’s clock is not set to the correct date and time I highly recommend syncing
with an internal NTP server or your primary domain controller that is syncing to an external NTP
server. I recommend this because of time changes during the year which will make this process
automated as long as your domain controller is functioning correctly and receiving the correct
date and time.
 Check to see if your switch is syncing with an NTP server.
o Switch# sh ntp status
 If your switch is not syncing you will need to configure an NTP server lookup to
obtain the correct date and time. Please note: I am configuring the below time
Page 2 of 5
zone settings because I am in New York so please pay attention if you are located
in another state/country and visit the Standard Time Zone List.
o Switch# conf t
o Switch (config)# clock timezone EST -05
o Switch (config)# ntp server x.x.x.x (IP ADDRESS)
o Switch (config)# end
Step 3: Configuring the KRON command scheduler.
Below is a prepared script that I have implemented within my network infrastructure to
automatically backup my switches startup and running configurations daily at 6:00pm. Please
note that the KRON scheduler can make use of either FTP or TFTP transfer protocols. I am
backing up both the startup and the running configs just in case someone forgets to save the
configuration on a switch after they have made changes. By default once a file is backed up to
your FTP server it will overwrite an older one with the same name so I have given the files
names that include the name of each weekday. I figured this would be a safe plan due to the fact
that the FTP server is backed up nightly at midnight so if needed I can obtain older
configurations.
There are a few items to change in the below script to personalize it for your use:
 FTPIP
 SWITCHNAME
 FTPUSERNAME
 FTPUSERPASSWORD
Step 3.1: Create an FTP user account.
Switch# conf t
Switch (config)# ip ftp username FTPUSERNAME
Switch (config)# ip ftp password FTPUSERPASSWORD
Switch (config)# end
Step 3.2: Create a kron policy-list.
conf t
kron policy-list Mon-Backup-Configs
cli show running-config | redirect ftp://FTPIP/SWITCHNAME-Running-Config-Monday.txt
cli show startup-config | redirect ftp://FTPIP/SWITCHNAME-Startup-Config-Monday.txt
end
conf t
kron policy-list Tues-Backup-Configs
Page 3 of 5
cli show running-config | redirect ftp://FTPIP/SWITCHNAME-Running-Config-Tuesday.txt
cli show startup-config | redirect ftp://FTPIP/SWITCHNAME-Startup-Config-Tuesday.txt
end
conf t
kron policy-list Wed-Backup-Configs
cli show running-config | redirect ftp://FTPIP/SWITCHNAME-Running-Config-Wednesday.txt
cli show startup-config | redirect ftp://FTPIP/SWITCHNAME-Startup-Config-Wednesday.txt
end
conf t
kron policy-list Thurs-Backup-Configs
cli show running-config | redirect ftp://FTPIP/SWITCHNAME-Running-Config-Thursday.txt
cli show startup-config | redirect ftp://FTPIP/SWITCHNAME-Startup-Config-Thursday.txt
end
conf t
kron policy-list Fri-Backup-Configs
cli show running-config | redirect ftp://FTPIP/SWITCHNAME-Running-Config-Friday.txt
cli show startup-config | redirect ftp://FTPIP/SWITCHNAME-Startup-Config-Friday.txt
end
conf t
kron policy-list Sat-Backup-Configs
cli show running-config | redirect ftp://FTPIP/SWITCHNAME-Running-Config-Saturday.txt
cli show startup-config | redirect ftp://FTPIP/SWITCHNAME-Startup-Config-Saturday.txt
end
conf t
kron policy-list Sun-Backup-Configs
cli show running-config | redirect ftp://FTPIP/SWITCHNAME-Running-Config-Sunday.txt
cli show startup-config | redirect ftp://FTPIP/SWITCHNAME-Startup-Config-Sunday.txt
end
Step 3.3: Create a kron occurrence schedule.
conf t
kron occurrence Mon-Backups at 18:00 Mon recurring
policy-list Mon-Backup-Configs
end
conf t
kron occurrence Tues-Backups at 18:00 Tues recurring
policy-list Tues-Backup-Configs
Page 4 of 5
end
conf t
kron occurrence Wed-Backups at 18:00 Wed recurring
policy-list Wed-Backup-Configs
end
conf t
kron occurrence Thurs-Backups at 18:00 Thurs recurring
policy-list Thurs-Backup-Configs
end
conf t
kron occurrence Fri-Backups at 18:00 Fri recurring
policy-list Fri-Backup-Configs
end
conf t
kron occurrence Sat-Backups at 18:00 Sat recurring
policy-list Sat-Backup-Configs
end
conf t
kron occurrence Sun-Backups at 18:00 Sun recurring
policy-list Sun-Backup-Configs
end
Step 3.4: Save your configuration.
Switch# copy run start
Step 4: Verify your KRON schedules.
Switch# show kron schedule
Output should appear similar to:
Kron Occurrence Schedule
Mon-Backups inactive, will run again in 4 days 05:06:29 at 18:00 on Mon
Tues-Backups inactive, will run again in 5 days 05:06:29 at 18:00 on Tue
Wed-Backups inactive, will run again in 6 days 05:06:29 at 18:00 on Wed
Thurs-Backups inactive, will run again in 0 days 05:06:29 at 18:00 on Thu
Fri-Backups inactive, will run again in 1 days 05:06:29 at 18:00 on Fri
Sat-Backups inactive, will run again in 2 days 05:06:29 at 18:00 on Sat
Sun-Backups inactive, will run again in 3 days 05:06:29 at 18:00 on Sun
Page 5 of 5
If your KRON schedules look complete then you should be all set and now you can just keep tabs on
your FTP server to make sure everything is backing up as planned.
Step 5: Testing the KRON scheduler with the oneshot command. Verify switch clock time by using
the “sh clock” command and give yourself enough time to implement the following commands.
Switch# conf t
Switch (config)# kron occurrence One-Time-Backup at 11:22 Mon oneshot
Switch (config-kron-occurence)# policy-list Mon-Backup-Configs
Switch (config-kron-occurence)# end
Switch# sh clock
If your script ran successfully you will now have a copy of that switch’s startup and running
configurations on your FTP server.

More Related Content

What's hot

Advanced Network Design
Advanced Network DesignAdvanced Network Design
Advanced Network DesignCisco Russia
 
MikroTik Multicast Routing [www.imxpert.co]
MikroTik Multicast Routing [www.imxpert.co]MikroTik Multicast Routing [www.imxpert.co]
MikroTik Multicast Routing [www.imxpert.co]Faisal Reza
 
Introduction to BRAS
Introduction to BRASIntroduction to BRAS
Introduction to BRASKHNOG
 
Ccna new lab_manual_by_esp_team
Ccna new lab_manual_by_esp_teamCcna new lab_manual_by_esp_team
Ccna new lab_manual_by_esp_teamRaja Mazhar
 
Network Jumbo Frame Config Guide
Network Jumbo Frame Config GuideNetwork Jumbo Frame Config Guide
Network Jumbo Frame Config GuideWoo Hyung Choi
 
NAT (network address translation) & PAT (port address translation)
NAT (network address translation) & PAT (port address translation)NAT (network address translation) & PAT (port address translation)
NAT (network address translation) & PAT (port address translation)Netwax Lab
 
Chapter 16 : inter-vlan routing
Chapter 16 : inter-vlan routingChapter 16 : inter-vlan routing
Chapter 16 : inter-vlan routingteknetir
 
Juniper mpls best practice part 2
Juniper mpls best practice   part 2Juniper mpls best practice   part 2
Juniper mpls best practice part 2Febrian ‎
 
Network Troubleshooting - Part 1
Network Troubleshooting - Part 1Network Troubleshooting - Part 1
Network Troubleshooting - Part 1SolarWinds
 
CCNA Course Training Presentation
CCNA Course Training PresentationCCNA Course Training Presentation
CCNA Course Training PresentationRohit Singh
 
Hot standby router protocol (hsrp) using
Hot standby router protocol (hsrp) usingHot standby router protocol (hsrp) using
Hot standby router protocol (hsrp) usingShubhiGupta94
 
How To Add Roles & Features
How To Add Roles & FeaturesHow To Add Roles & Features
How To Add Roles & FeaturesMjNoOoN
 

What's hot (20)

Vlsm
VlsmVlsm
Vlsm
 
Advanced Network Design
Advanced Network DesignAdvanced Network Design
Advanced Network Design
 
MikroTik Multicast Routing [www.imxpert.co]
MikroTik Multicast Routing [www.imxpert.co]MikroTik Multicast Routing [www.imxpert.co]
MikroTik Multicast Routing [www.imxpert.co]
 
Introduction to BRAS
Introduction to BRASIntroduction to BRAS
Introduction to BRAS
 
Ccna new lab_manual_by_esp_team
Ccna new lab_manual_by_esp_teamCcna new lab_manual_by_esp_team
Ccna new lab_manual_by_esp_team
 
EMEA Airheads- Manage Devices at Branch Office (BOC)
EMEA Airheads- Manage Devices at Branch Office (BOC)EMEA Airheads- Manage Devices at Branch Office (BOC)
EMEA Airheads- Manage Devices at Branch Office (BOC)
 
Network Jumbo Frame Config Guide
Network Jumbo Frame Config GuideNetwork Jumbo Frame Config Guide
Network Jumbo Frame Config Guide
 
Vpc notes
Vpc notesVpc notes
Vpc notes
 
CCNA CheatSheet
CCNA CheatSheetCCNA CheatSheet
CCNA CheatSheet
 
Advanced RF Design & Troubleshooting
Advanced RF Design & TroubleshootingAdvanced RF Design & Troubleshooting
Advanced RF Design & Troubleshooting
 
NAT (network address translation) & PAT (port address translation)
NAT (network address translation) & PAT (port address translation)NAT (network address translation) & PAT (port address translation)
NAT (network address translation) & PAT (port address translation)
 
Chapter 16 : inter-vlan routing
Chapter 16 : inter-vlan routingChapter 16 : inter-vlan routing
Chapter 16 : inter-vlan routing
 
Juniper mpls best practice part 2
Juniper mpls best practice   part 2Juniper mpls best practice   part 2
Juniper mpls best practice part 2
 
Network Troubleshooting - Part 1
Network Troubleshooting - Part 1Network Troubleshooting - Part 1
Network Troubleshooting - Part 1
 
Nat pat
Nat patNat pat
Nat pat
 
What is Network Address Translation (NAT)
What is Network Address Translation (NAT)What is Network Address Translation (NAT)
What is Network Address Translation (NAT)
 
CCNA Course Training Presentation
CCNA Course Training PresentationCCNA Course Training Presentation
CCNA Course Training Presentation
 
Hot standby router protocol (hsrp) using
Hot standby router protocol (hsrp) usingHot standby router protocol (hsrp) using
Hot standby router protocol (hsrp) using
 
How To Add Roles & Features
How To Add Roles & FeaturesHow To Add Roles & Features
How To Add Roles & Features
 
Outdoor network engineering_chuck lukaszewski
Outdoor network engineering_chuck lukaszewskiOutdoor network engineering_chuck lukaszewski
Outdoor network engineering_chuck lukaszewski
 

Similar to Automate Cisco Switch Configuration Backups with KRON

Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administratorsSharon James
 
How to set ssh telnet-http connection timeout using mpf for asa 8.3 and later
How to set ssh telnet-http connection timeout using mpf for asa 8.3 and laterHow to set ssh telnet-http connection timeout using mpf for asa 8.3 and later
How to set ssh telnet-http connection timeout using mpf for asa 8.3 and latercandy tang
 
TFTP Installation Configuration Guide
TFTP Installation Configuration GuideTFTP Installation Configuration Guide
TFTP Installation Configuration GuideVCP Muthukrishna
 
15 most valuable reports with CFEngine
15 most valuable reports with CFEngine15 most valuable reports with CFEngine
15 most valuable reports with CFEngineCFEngine
 
Cfg Mgmtcamp 2015 - Releases
Cfg Mgmtcamp 2015 - ReleasesCfg Mgmtcamp 2015 - Releases
Cfg Mgmtcamp 2015 - ReleasesCFEngine
 
Releases - CFEngine presentation - Configuration Management Camp 2015
Releases - CFEngine presentation - Configuration Management Camp 2015Releases - CFEngine presentation - Configuration Management Camp 2015
Releases - CFEngine presentation - Configuration Management Camp 2015kacfengine
 
Day 6 - Manage CISCO IOS
Day 6 - Manage CISCO IOSDay 6 - Manage CISCO IOS
Day 6 - Manage CISCO IOSanilinvns
 
Network Configuration Manager Training - [Season 7] Part 1 - Configuration ba...
Network Configuration Manager Training - [Season 7] Part 1 - Configuration ba...Network Configuration Manager Training - [Season 7] Part 1 - Configuration ba...
Network Configuration Manager Training - [Season 7] Part 1 - Configuration ba...ManageEngine, Zoho Corporation
 
Manage CISCO IOS
Manage CISCO IOSManage CISCO IOS
Manage CISCO IOSanilinvns
 
Openfire xmpp server on windows server 2012 r2 with spark sso
Openfire xmpp server on windows server 2012 r2 with spark ssoOpenfire xmpp server on windows server 2012 r2 with spark sso
Openfire xmpp server on windows server 2012 r2 with spark ssolaonap166
 
Linux fundamental - Chap 15 Job Scheduling
Linux fundamental - Chap 15 Job SchedulingLinux fundamental - Chap 15 Job Scheduling
Linux fundamental - Chap 15 Job SchedulingKenny (netman)
 
Upgrading from CFEngine2 to CFEngine3 - Webinar Slides
Upgrading from CFEngine2 to CFEngine3 - Webinar SlidesUpgrading from CFEngine2 to CFEngine3 - Webinar Slides
Upgrading from CFEngine2 to CFEngine3 - Webinar SlidesCFEngine
 
How To Install and Configure Chrony on RHEL 7
How To Install and Configure Chrony on RHEL 7How To Install and Configure Chrony on RHEL 7
How To Install and Configure Chrony on RHEL 7VCP Muthukrishna
 
A user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management toolsA user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management toolsSaltStack
 
DNS windows server(2008R2) & linux(SLES 11)
DNS windows server(2008R2) & linux(SLES 11)DNS windows server(2008R2) & linux(SLES 11)
DNS windows server(2008R2) & linux(SLES 11)Tola LENG
 
How to run multiple instances of transmission daemon in linux debian or ubuntu
How to run multiple instances of transmission daemon in linux debian or ubuntuHow to run multiple instances of transmission daemon in linux debian or ubuntu
How to run multiple instances of transmission daemon in linux debian or ubuntuAditya Gusti Tammam
 
4 ip services dhcp-part b
4 ip services dhcp-part b4 ip services dhcp-part b
4 ip services dhcp-part bSagarR24
 
KoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbegan
KoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbeganKoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbegan
KoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbeganTobias Koprowski
 

Similar to Automate Cisco Switch Configuration Backups with KRON (20)

Linux crontab
Linux crontabLinux crontab
Linux crontab
 
Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administrators
 
How to set ssh telnet-http connection timeout using mpf for asa 8.3 and later
How to set ssh telnet-http connection timeout using mpf for asa 8.3 and laterHow to set ssh telnet-http connection timeout using mpf for asa 8.3 and later
How to set ssh telnet-http connection timeout using mpf for asa 8.3 and later
 
TFTP Installation Configuration Guide
TFTP Installation Configuration GuideTFTP Installation Configuration Guide
TFTP Installation Configuration Guide
 
15 most valuable reports with CFEngine
15 most valuable reports with CFEngine15 most valuable reports with CFEngine
15 most valuable reports with CFEngine
 
Cfg Mgmtcamp 2015 - Releases
Cfg Mgmtcamp 2015 - ReleasesCfg Mgmtcamp 2015 - Releases
Cfg Mgmtcamp 2015 - Releases
 
Perforce Setup
Perforce SetupPerforce Setup
Perforce Setup
 
Releases - CFEngine presentation - Configuration Management Camp 2015
Releases - CFEngine presentation - Configuration Management Camp 2015Releases - CFEngine presentation - Configuration Management Camp 2015
Releases - CFEngine presentation - Configuration Management Camp 2015
 
Day 6 - Manage CISCO IOS
Day 6 - Manage CISCO IOSDay 6 - Manage CISCO IOS
Day 6 - Manage CISCO IOS
 
Network Configuration Manager Training - [Season 7] Part 1 - Configuration ba...
Network Configuration Manager Training - [Season 7] Part 1 - Configuration ba...Network Configuration Manager Training - [Season 7] Part 1 - Configuration ba...
Network Configuration Manager Training - [Season 7] Part 1 - Configuration ba...
 
Manage CISCO IOS
Manage CISCO IOSManage CISCO IOS
Manage CISCO IOS
 
Openfire xmpp server on windows server 2012 r2 with spark sso
Openfire xmpp server on windows server 2012 r2 with spark ssoOpenfire xmpp server on windows server 2012 r2 with spark sso
Openfire xmpp server on windows server 2012 r2 with spark sso
 
Linux fundamental - Chap 15 Job Scheduling
Linux fundamental - Chap 15 Job SchedulingLinux fundamental - Chap 15 Job Scheduling
Linux fundamental - Chap 15 Job Scheduling
 
Upgrading from CFEngine2 to CFEngine3 - Webinar Slides
Upgrading from CFEngine2 to CFEngine3 - Webinar SlidesUpgrading from CFEngine2 to CFEngine3 - Webinar Slides
Upgrading from CFEngine2 to CFEngine3 - Webinar Slides
 
How To Install and Configure Chrony on RHEL 7
How To Install and Configure Chrony on RHEL 7How To Install and Configure Chrony on RHEL 7
How To Install and Configure Chrony on RHEL 7
 
A user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management toolsA user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management tools
 
DNS windows server(2008R2) & linux(SLES 11)
DNS windows server(2008R2) & linux(SLES 11)DNS windows server(2008R2) & linux(SLES 11)
DNS windows server(2008R2) & linux(SLES 11)
 
How to run multiple instances of transmission daemon in linux debian or ubuntu
How to run multiple instances of transmission daemon in linux debian or ubuntuHow to run multiple instances of transmission daemon in linux debian or ubuntu
How to run multiple instances of transmission daemon in linux debian or ubuntu
 
4 ip services dhcp-part b
4 ip services dhcp-part b4 ip services dhcp-part b
4 ip services dhcp-part b
 
KoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbegan
KoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbeganKoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbegan
KoprowskiT_SQLSat219_Kiev_2AM-aDisasterJustbegan
 

Recently uploaded

Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Thierry Lestable
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupCatarinaPereira64715
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesThousandEyes
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...Product School
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...Product School
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
 
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»QADay
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxAbida Shariff
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Product School
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...Elena Simperl
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsExpeed Software
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
 

Recently uploaded (20)

Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 

Automate Cisco Switch Configuration Backups with KRON

  • 1. Page 1 of 5 Automate Cisco Switch Configuration Backups with KRON Created by. Travis Kench - travis@tkcomputersolutions.com - 1/29/2014 Project: Find a free solution to automate Cisco switch configuration backups. Solution: Cisco KRON via CLI The Cisco KRON is a command scheduler utility. It allows you to schedule commands to run once, at system startup, or at specified dates and times. I have tested and verified that this works on the following switch models:  2901 (VOIP Phone Gateway)  2911 (VOIP Phone Gateway)  2921 (VOIP Phone Gateway)  2951 (VOIP Phone Gateway)  2960s  3560s  3750s I have verified that the KRON utility isn’t available on the following switch models:  2950s  3500s Step 1: Check to see if your switch’s clock is set to the correct time. Switch> en Switch# sh clock Step 2: If the switch’s clock is not set to the correct date and time I highly recommend syncing with an internal NTP server or your primary domain controller that is syncing to an external NTP server. I recommend this because of time changes during the year which will make this process automated as long as your domain controller is functioning correctly and receiving the correct date and time.  Check to see if your switch is syncing with an NTP server. o Switch# sh ntp status  If your switch is not syncing you will need to configure an NTP server lookup to obtain the correct date and time. Please note: I am configuring the below time
  • 2. Page 2 of 5 zone settings because I am in New York so please pay attention if you are located in another state/country and visit the Standard Time Zone List. o Switch# conf t o Switch (config)# clock timezone EST -05 o Switch (config)# ntp server x.x.x.x (IP ADDRESS) o Switch (config)# end Step 3: Configuring the KRON command scheduler. Below is a prepared script that I have implemented within my network infrastructure to automatically backup my switches startup and running configurations daily at 6:00pm. Please note that the KRON scheduler can make use of either FTP or TFTP transfer protocols. I am backing up both the startup and the running configs just in case someone forgets to save the configuration on a switch after they have made changes. By default once a file is backed up to your FTP server it will overwrite an older one with the same name so I have given the files names that include the name of each weekday. I figured this would be a safe plan due to the fact that the FTP server is backed up nightly at midnight so if needed I can obtain older configurations. There are a few items to change in the below script to personalize it for your use:  FTPIP  SWITCHNAME  FTPUSERNAME  FTPUSERPASSWORD Step 3.1: Create an FTP user account. Switch# conf t Switch (config)# ip ftp username FTPUSERNAME Switch (config)# ip ftp password FTPUSERPASSWORD Switch (config)# end Step 3.2: Create a kron policy-list. conf t kron policy-list Mon-Backup-Configs cli show running-config | redirect ftp://FTPIP/SWITCHNAME-Running-Config-Monday.txt cli show startup-config | redirect ftp://FTPIP/SWITCHNAME-Startup-Config-Monday.txt end conf t kron policy-list Tues-Backup-Configs
  • 3. Page 3 of 5 cli show running-config | redirect ftp://FTPIP/SWITCHNAME-Running-Config-Tuesday.txt cli show startup-config | redirect ftp://FTPIP/SWITCHNAME-Startup-Config-Tuesday.txt end conf t kron policy-list Wed-Backup-Configs cli show running-config | redirect ftp://FTPIP/SWITCHNAME-Running-Config-Wednesday.txt cli show startup-config | redirect ftp://FTPIP/SWITCHNAME-Startup-Config-Wednesday.txt end conf t kron policy-list Thurs-Backup-Configs cli show running-config | redirect ftp://FTPIP/SWITCHNAME-Running-Config-Thursday.txt cli show startup-config | redirect ftp://FTPIP/SWITCHNAME-Startup-Config-Thursday.txt end conf t kron policy-list Fri-Backup-Configs cli show running-config | redirect ftp://FTPIP/SWITCHNAME-Running-Config-Friday.txt cli show startup-config | redirect ftp://FTPIP/SWITCHNAME-Startup-Config-Friday.txt end conf t kron policy-list Sat-Backup-Configs cli show running-config | redirect ftp://FTPIP/SWITCHNAME-Running-Config-Saturday.txt cli show startup-config | redirect ftp://FTPIP/SWITCHNAME-Startup-Config-Saturday.txt end conf t kron policy-list Sun-Backup-Configs cli show running-config | redirect ftp://FTPIP/SWITCHNAME-Running-Config-Sunday.txt cli show startup-config | redirect ftp://FTPIP/SWITCHNAME-Startup-Config-Sunday.txt end Step 3.3: Create a kron occurrence schedule. conf t kron occurrence Mon-Backups at 18:00 Mon recurring policy-list Mon-Backup-Configs end conf t kron occurrence Tues-Backups at 18:00 Tues recurring policy-list Tues-Backup-Configs
  • 4. Page 4 of 5 end conf t kron occurrence Wed-Backups at 18:00 Wed recurring policy-list Wed-Backup-Configs end conf t kron occurrence Thurs-Backups at 18:00 Thurs recurring policy-list Thurs-Backup-Configs end conf t kron occurrence Fri-Backups at 18:00 Fri recurring policy-list Fri-Backup-Configs end conf t kron occurrence Sat-Backups at 18:00 Sat recurring policy-list Sat-Backup-Configs end conf t kron occurrence Sun-Backups at 18:00 Sun recurring policy-list Sun-Backup-Configs end Step 3.4: Save your configuration. Switch# copy run start Step 4: Verify your KRON schedules. Switch# show kron schedule Output should appear similar to: Kron Occurrence Schedule Mon-Backups inactive, will run again in 4 days 05:06:29 at 18:00 on Mon Tues-Backups inactive, will run again in 5 days 05:06:29 at 18:00 on Tue Wed-Backups inactive, will run again in 6 days 05:06:29 at 18:00 on Wed Thurs-Backups inactive, will run again in 0 days 05:06:29 at 18:00 on Thu Fri-Backups inactive, will run again in 1 days 05:06:29 at 18:00 on Fri Sat-Backups inactive, will run again in 2 days 05:06:29 at 18:00 on Sat Sun-Backups inactive, will run again in 3 days 05:06:29 at 18:00 on Sun
  • 5. Page 5 of 5 If your KRON schedules look complete then you should be all set and now you can just keep tabs on your FTP server to make sure everything is backing up as planned. Step 5: Testing the KRON scheduler with the oneshot command. Verify switch clock time by using the “sh clock” command and give yourself enough time to implement the following commands. Switch# conf t Switch (config)# kron occurrence One-Time-Backup at 11:22 Mon oneshot Switch (config-kron-occurence)# policy-list Mon-Backup-Configs Switch (config-kron-occurence)# end Switch# sh clock If your script ran successfully you will now have a copy of that switch’s startup and running configurations on your FTP server.