Restore a Configuration

Created by Sanjay Kumar, Modified on Wed, 4 Sep at 8:19 AM by Sanjay Kumar

This article is to understand how to restore a specific device's configuration.  For this purpose we will be using the command config_restore.

Pre-requisite

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.
If node is not present refer to the "Getting Started with config management" to setup the Backup.  
Fig 1

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

Fig 2

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
Fig 3

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

Fig 4

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)
  • Command to restore a post-config backup of a specific jobid

    • config_restore -n <node> -s <jobid> 

  • Command to restore a marked config backup

    • config_restore -n <node> -s 'marked

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.

Fig 5

Note:

The Job we just created is a re-usable job.  It can be executed on any node to achieve the same purpose.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article