08-28-2020 03:57 AM
I understand that rollback nnn revert all the changes since the one referred by nnn.
How can I revert only the changes made by a specific commit?
For example in the following sequence I set the IP address on fastEthernet1/0 and then on FastEthernet 1/1. Then I would like to revert only the first configuration.
cisco@ncs% set devices device SDWAN_netsim config ios:interface FastEthernet 1/0 ip address primary address 1.1.1.1 mask 255.255.255.0
[ok][2020-08-28 12:45:20]
[edit]
cisco@ncs% commit label SetIf10 Commit complete.
[ok][2020-08-28 12:46:04]
[edit]
cisco@ncs% set devices device SDWAN_netsim config ios:interface FastEthernet 1/1 ip address primary address 2.2.2.2 mask 255.255.255.0
[ok][2020-08-28 12:46:13]
[edit]
cisco@ncs% commit label SetIf11 Commit complete.
[ok][2020-08-28 12:46:23]
[edit]
cisco@ncs% show commit list 5 2020-08-28 12:46:32
SNo. ID User Client Time Stamp Label Comment
~~~~ ~~ ~~~~ ~~~~~~ ~~~~~~~~~~ ~~~~~ ~~~~~~~
1327 13274 cisco cli 2020-08-28 12:46:18 SetIf11
1327 13273 cisco cli 2020-08-28 12:45:59 SetIf10
1327 13272 cisco cli 2020-08-28 12:44:34
1327 13271 cisco cli 2020-08-28 12:42:57 SetIpFastEt
1327 13270 cisco cli 2020-08-28 12:42:27 SetIpFastEt
[ok][2020-08-28 12:46:32]
[edit]
cisco@ncs% rollback 13273
[ok][2020-08-28 12:46:49]
[edit]
cisco@ncs% commit dry-run
cli {
local-node {
data devices {
device SDWAN_netsim {
config {
ios:interface {
FastEthernet 1/0 {
ip {
no-address {
+ address false;
}
address {
primary {
- address 1.1.1.1;
- mask 255.255.255.0;
}
}
}
}
FastEthernet 1/1 {
ip {
no-address {
+ address false;
}
address {
primary {
- address 2.2.2.2;
- mask 255.255.255.0;
}
}
}
}
}
}
}
}
}
}
[ok][2020-08-28 12:46:54]
Solved! Go to Solution.
08-28-2020 08:35 AM
Use rollback selective 12345 for this use-case.
08-28-2020 08:35 AM
Use rollback selective 12345 for this use-case.
05-01-2021 02:14 PM
What about python maapi api, how to perform selective rollback in python ?
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