10-07-2024 08:23 PM
Hello,
I successful create EEM script to backup the startup config to SCP server daily.
When i want to implement to Cisco Nexus i can see there is no event timer or event none for triggering the EEM.
Anyone know how we can schedule the EEM on Nexus?
Solved! Go to Solution.
10-07-2024 11:57 PM - edited 10-07-2024 11:57 PM
Hello @hs08
On Nexus switches, the EEM does not support event timers or the event none option, as it does on IOS platforms.
However, you can still schedule tasks like configuration backups using NX-OS Bash or Python scripts along with the scheduler feature, which provides a way to run commands at scheduled intervals. By using the scheduler feature, you can set up automated backups without relying on EEM in NX-OS.
Create your script using bash or python that will perform the backup operation.
copy running-config scp://username@scpserver:/path/to/backup.cfg
Save this script to the Nexus switch's file system, for example /bootflash/backup_script.sh.
Next, configure the scheduler to run this script at a specific time ; assuming the feature scheduler is activated.
conf t
scheduler job name backup_job
bash bootflash:/backup_script.sh
exit
Next, create a schedule to run the job:
scheduler schedule name daily_backup
job name backup_job
time start 00:00 repeat 24:00
exit
--Check:
show scheduler schedule
10-07-2024 11:57 PM - edited 10-07-2024 11:57 PM
Hello @hs08
On Nexus switches, the EEM does not support event timers or the event none option, as it does on IOS platforms.
However, you can still schedule tasks like configuration backups using NX-OS Bash or Python scripts along with the scheduler feature, which provides a way to run commands at scheduled intervals. By using the scheduler feature, you can set up automated backups without relying on EEM in NX-OS.
Create your script using bash or python that will perform the backup operation.
copy running-config scp://username@scpserver:/path/to/backup.cfg
Save this script to the Nexus switch's file system, for example /bootflash/backup_script.sh.
Next, configure the scheduler to run this script at a specific time ; assuming the feature scheduler is activated.
conf t
scheduler job name backup_job
bash bootflash:/backup_script.sh
exit
Next, create a schedule to run the job:
scheduler schedule name daily_backup
job name backup_job
time start 00:00 repeat 24:00
exit
--Check:
show scheduler schedule
10-08-2024 01:50 AM
Hi M02@rt37
It's work, thanks.
10-08-2024 01:53 AM
Perfect. You're so welcome @hs08
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