This article is to understand how to restore a specific device's configuration. For this purpose we will be using the command config_restore.
The node/device's configuration backup is setup
Verify if Backup is setup
Below is how to test if configuration backup is setup or not.
(1) Backups -> (2) Configuration -> (3) Nodename -> (4) Polling. Lookup for the node, if the polling status is 'yes' the the backup is setup.
Instructions for restoring configuration
Below example is about creating a job to restore the configuration for the node campus001-dist-b01 to its previous version. We will be scheduling the job to run now.
(1) Operate -> (2) New Jobs -> (3) Cmdb Jobs/YCE Jobs (Based on the type of the node) -> (4) Select the node -> (5) Next
Select the node (1) campus001-dist-b01 -> (2) Under Scenario replace text “task = Basic_cmd_job” with config_restore -n <node> -> (3) Save job as Rollback config (original text is --Default basic command job) ->(4) Save -> (5) Now -> (6) Schedule
This would restore the previous configuration of the node. Job status and logs can be verified under
(1) Operate -> (2) Job Status -> (3) Job Logs -> (4) Job Status -> (5) For Job Logs
There are other options that can be used with config_restore to restore specific versions of the config. This would need changes in step (2) of Fig (2). Below are the other options ot use in Step (2)
Jobid and Marking is available under (1) Backups -> (2) Config management -> (3) Select the node
The resulting popup window has configuration versions. Use (4) Mark, to mark a specific version. If to restore a specific version based on(5) jobid, it can be referred here as well.
The Job we just created is a re-usable job. It can be executed on any node to achieve the same purpose.