cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1088
Views
5
Helpful
5
Replies

Cisco NCS 5504 Configuration auto backup

jackykw123
Level 1
Level 1

Dear Sir,

 

On IOS platform,  I can use "kron" to execute "show run | redirct tftp" to backup the router configuraiton automatically.

 

May I have you help to check how to backup the  rotuer configuraiton automatically on NCS IOS-XR platform ? 

 

 

 

 

 

5 Replies 5

Hello,

 

I don't know if IOS XR has full EEM support. If it does, you could use the applets below. If neither works (let me know if it doesn't, I'll send over the script), you could use a TCL script.

 

This applet will backup the config each day at midnight:

 

event manager applet BACKUP_RUN_TFTP
event timer cron cron-entry "0 0 * * *"
action 1.0 info type routername
action 2.0 cli command "enable"
action 3.0 cli command "config t"
action 4.0 cli command "file prompt quiet"
action 5.0 cli command "end"
action 6.0 cli command "copy run tftp://192.168.1.2/$_info_routername-config_$_event_pub_sec"
action 7.0 cli command "config t"
action 8.0 cli command "no file prompt quiet"
action 9.0 cli command "end"

 

This applet will run every 24 hours:

 

event manager applet BACKUP_RUN_TFTP
description Backup-Running-Config-To-TFTP
event timer watchdog time 86400
action 0.1 info type routername
action 1.0 cli command "enable"
action 1.1 cli command "copy run tftp" pattern "Address"
action 1.2 cli command "192.168.1.2" pattern "filename"
action 1.3 cli command "$_info_routername-config_$_event_pub_sec"
action 2.0 syslog priority informational msg "Configuration successfully written to TFTP server"!

Dear Georg,

 

The running software support Event Manager and slightly difference from other platform.  I will goto check the document for details

 


RP/0/RP0/CPU0:XXX-01(config)#event manager ?
directory Set Embedded Event Manager directory information
environment Set an Embedded Event Manager global variable for policies
pam-agent Embedded Event Manager pam-agent(cisco-support)
policy Register an Event Manager policy
refresh-time Set refresh time (in seconds) for policy username's AAA taskmap
scheduler Set Embedded Event Manager scheduler options
test-client Embedded Event Manager test-client(cisco-support)

 

Hello,

 

looks like EEM applets are not available at all. Your only option is to register an EEM policy in conjunction with a TCL script. I'll test and send that over...

Hello
You can also archive the configuration as/when you save the configuration of the rtr  or every certain time period-

archive
time-period xxx
path tftp://x.x.x/backup.txt/%h-%t
write-memory

 

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Dear Paul,

 

My router running IOS XR Version 7.0.2 , the command "archive" is not available....

 

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card