03-07-2021 06:43 PM
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 ?
03-08-2021 01:00 AM
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"!
03-08-2021 05:27 PM
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)
03-09-2021 01:29 AM
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...
03-08-2021 01:22 AM - edited 03-08-2021 02:57 AM
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
03-08-2021 05:18 PM
Dear Paul,
My router running IOS XR Version 7.0.2 , the command "archive" is not available....
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