04-15-2011 01:20 PM
Hi,
Can someone help me with the exact syntax for a scheduled roll back command. I do not have any 7Ks in a lab but would like to perform a scheduled rollback while making remote changes in case they take down the system. Any assistance is much appreciated.
/r
Rob
Solved! Go to Solution.
04-18-2011 07:51 AM
Hello Robert,
Here is the output I just performed in my lab.
NXOS_503# checkpoint test
.....Done
NXOS_503# conf t
Enter configuration commands, one per line. End with CNTL/Z.
NXOS_503(config)# hostname TEST <--- Chaned hostname to see if the rollback will work fine.
TEST(config)# scheduler job name JOB <--- Define a job where you can set CLIs that you like to execute.
TEST(config-job)# rollback running-config checkpoint test <--- this CLI will be executed at the scheduled time
TEST(config-job)# exit
TEST(config)# scheduler schedule name ROLLBACK <--- Define a scheduler
TEST(config-schedule)# job name JOB <--- Set the job you defined above
TEST(config-schedule)# time start 2011:Apr:18:14:40 <--- The time the CLI to be executed. Should be yyyy:mmm:dd:HH:MM or +dd:HH:MM
TEST(config-schedule)# end
TEST# show scheduler schedule name ROLLBACK
Schedule Name : ROLLBACK
------------------------------
User Name : admin
Schedule Type : Run once on Mon Apr 18 14:40:00 2011
Last Execution Time : Yet to be executed
-----------------------------------------------
Job Name Last Execution Status
-----------------------------------------------
JOB -NA-
==============================================================================
TEST#
TEST# show clock
14:39:00.318 UTC Mon Apr 18 2011
NXOS_503# show clock <--- Hostname changed that means rollback was done.
14:40:09.523 UTC Mon Apr 18 2011
NXOS_503# show scheduler schedule name ROLLBACK
Schedule Name : ROLLBACK
------------------------------
User Name : admin
Schedule Type : Run once on Mon Apr 18 14:40:00 2011
Last Execution Time : Mon Apr 18 14:40:00 2011
Last Completion Time: Mon Apr 18 14:40:07 2011
Execution count : 1
-----------------------------------------------
Job Name Last Execution Status
-----------------------------------------------
JOB Success (0)
==============================================================================
NXOS_503#
Please let me know if you have other tasks to schedule. I can provide as well.
If above fullfills all the things you need, and you find this helpful, please rate me :-)
Regards,
Kimihito.
04-18-2011 05:23 AM
Hi Rober,
Are you still looking for the exact command syntax ?
If so, I would be able to provide that.
Let me know some additional information.
- NX-OS version
- What is the name of your checkpoint or file from which you want retrive configuration ?
- What time you like it to starts ? Is it one-time, daily, weekly or monthly task ?
Regards,
Kimihito.
04-18-2011 05:35 AM
Kimihito,
Yes please, and thanks.
NXOS version 5.0(3)
Checkpoint file: test
Time to start is one time only - any random time.
I basically want to schedule a checkpoint return prior to making any large change - i.e. removing a route, shutting down critical interfaces, etc.
Thank you very much,
Rob
04-18-2011 07:51 AM
Hello Robert,
Here is the output I just performed in my lab.
NXOS_503# checkpoint test
.....Done
NXOS_503# conf t
Enter configuration commands, one per line. End with CNTL/Z.
NXOS_503(config)# hostname TEST <--- Chaned hostname to see if the rollback will work fine.
TEST(config)# scheduler job name JOB <--- Define a job where you can set CLIs that you like to execute.
TEST(config-job)# rollback running-config checkpoint test <--- this CLI will be executed at the scheduled time
TEST(config-job)# exit
TEST(config)# scheduler schedule name ROLLBACK <--- Define a scheduler
TEST(config-schedule)# job name JOB <--- Set the job you defined above
TEST(config-schedule)# time start 2011:Apr:18:14:40 <--- The time the CLI to be executed. Should be yyyy:mmm:dd:HH:MM or +dd:HH:MM
TEST(config-schedule)# end
TEST# show scheduler schedule name ROLLBACK
Schedule Name : ROLLBACK
------------------------------
User Name : admin
Schedule Type : Run once on Mon Apr 18 14:40:00 2011
Last Execution Time : Yet to be executed
-----------------------------------------------
Job Name Last Execution Status
-----------------------------------------------
JOB -NA-
==============================================================================
TEST#
TEST# show clock
14:39:00.318 UTC Mon Apr 18 2011
NXOS_503# show clock <--- Hostname changed that means rollback was done.
14:40:09.523 UTC Mon Apr 18 2011
NXOS_503# show scheduler schedule name ROLLBACK
Schedule Name : ROLLBACK
------------------------------
User Name : admin
Schedule Type : Run once on Mon Apr 18 14:40:00 2011
Last Execution Time : Mon Apr 18 14:40:00 2011
Last Completion Time: Mon Apr 18 14:40:07 2011
Execution count : 1
-----------------------------------------------
Job Name Last Execution Status
-----------------------------------------------
JOB Success (0)
==============================================================================
NXOS_503#
Please let me know if you have other tasks to schedule. I can provide as well.
If above fullfills all the things you need, and you find this helpful, please rate me :-)
Regards,
Kimihito.
04-18-2011 07:57 AM
Kimihito,
Thanks so much. Exactly what I was looking for. I really appreciate it.
/r
Rob
05-21-2016 12:54 PM
the feature needs to be enabled:
(config)# feature scheduler
Ed-
01-09-2015 11:52 AM
Hi guys. I found this forum while searching the internet. I too am looking for a solution to set a scheduled rollback, but with NX-OS version 6.2x.
I find all the right syntax with checkpoint and rollback commands, except for a way to schedule a rollback!
I tried entering the scheduler job mode as suggested above, but it tells me invalid command.
Thanks for any help.
Andy
05-18-2019 10:48 AM
conf t
feature scheduler
end
That should activate it. It's not on by default.
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