December 2, 2022

How to Automate Network Configuration Backup Using SolarWinds NCM

[ad_1]

As we know, backing up network configuration is essential, in a large enterprise, it is not easy to manually backup each device’s configuration by connecting to all devices. If frequent changes occur on the devices, it is difficult to save and track the changes made.

To overcome this difficulty, we can Solarwinds NCM to automate configuration backup using one of the features called Works. We can schedule tasks to download the configuration daily or weekly depending on the environment.

Works is one of the built-in features available in Solarwinds NCM. We can create jobs to automate our network-related activities. One of the essential advantages of Works automates network configuration backup. Based on the schedule, the task will automatically download backups.

We can set up a notification email to get the work report to review the backup status of the devices.

Solarwinds NCM has many useful features. To learn more about Solarwinds NCM, click this link.

How to automate configuration backup

Certain prerequisites exist for downloading the configuration from a device and storing it in an archive folder.

  1. The network device must be integrated into Solarwinds NCM.
  2. A connection profile must be configured to download the configuration from the device.
  3. Configure a configuration archive folder to store downloaded configuration.

How to integrate network device in Solarwinds

First, we need to integrate the device into Solarwinds NCM. Onboarding a node in Solarwinds is a simple task to onboard the node using SNMP, if using SNMP V2, the SNMP string must be configured on the device.

If using SNMP V3, a user name, authentication method and authentication password, encryption method and password must be configured on the device side. To learn how to integrate a device, click on this link.

Configuring the connection profile in the device and Solarwinds

A login profile is nothing more than a username and password with enough privileges to download the configuration from the device using SSH or Telnet, if you will manage the configuration on the device, the connection profile must have sufficient privileges to make changes in the configuration.

Once the connection profile is configured, follow the steps below to add the connection profile in Solarwinds.

  1. On your Solarwinds NCM web console, navigate to Settings and click on All settings.
  2. Click on NCM Settings below Product specific settings.
  3. Click on Connection profiles below Global Device Defaults
  4. Click on Create a new to add your connection profile.
  5. Give your connection profile a name. Enter the SSH login username and password, click the drop-down menu under the activation level, select activate, and then provide the activation level password. Select Automatic SSH in Run command and scripts, request configuration, transfer configurations. Mention the Telnet and SSH port numbers.
    If you select Automatically test this profile against monitored nodes that allow it, it will automatically test these credentials for newly onboarded devices using network discovery. Finally click on Submit save.
  6. We have configured the connection profile, let’s see how to add this connection profile to a device.
  7. Go now to Settings and click on Manage nodes.
  8. Select the device to which you want to apply the connection profile and click Edit properties.
    You can also select multiple devices to apply the connection profile.
  9. Scroll to MCN Properties section, and in Connection Profileselect the connection profile you created from the drop-down list and click on Testyou should get one Passed test message. If the test failed, make sure the connection profile is correctly configured on the device side and that the SSH port is allowed in your firewall between your Solarwinds NCM server and the device.

We have successfully configured the connection profile. Now we need to set up a configuration archive folder to store the backup of the configuration downloaded from the devices.

Configure a configuration archive folder to store downloaded configuration

Solarwinds NCM provides a default configuration archive folder, which will be placed on the server where Solarwinds NCM is installed. We can use this folder to store our backups. Let’s see how to check the location of the archive folder and validate the path.

  1. In NCM Settings, click Configuration Settings under Configuration Settings.
  2. In Configuration Settings, you can use the default settings for Configuration transfer and Setup comparisons until changes are needed. In the Configure, archive section, select Save a copy of each configuration to the archive directory as it is downloaded so that the downloaded configuration is stored in the archive folder.
    Check the configuration archive folder path and click To validate; you should get a validation successful message. If validation fails, check if the mentioned folder is available in the exact path; otherwise, create the folder and recheck the validation.
    You can use the default variables configured to name configuration files. Once validated, click on Submit.

Now our archive folder is ready to store the configuration backup. We have fulfilled the prerequisites. Now let’s see how to create a task to automate the configuration download.

Scheduling the configuration backup task

To schedule the configuration backup task, follow the steps below.

  1. Go to Home, Network Configuration and click on Jobs in the submenu.
  2. We can see the default tasks for nightly and weekly backup tasks, we can use them or we can create a new one by clicking on Create a new job.
  3. Provide an appropriate name for the job, then select Download configurations from devices from Type of employment the drop-down list. Select Basic in Schedule Type and click on Daily. Mention the time when the job should be launched and select the start and end date. By default Solarwinds uses the end date as 10 years from the start date, we can also choose our end date if needed.

    Once configured, click Next.
  4. There are three different options for choosing the devices for the job. If you want to select a specific node, use the Select nodes option. Use the All Nodes option if you want all devices to do the job. You can use the Dynamic selection possibility to choose the nodes with certain criteria; for example, vendor equals Cisco; this will bring all cisco devices into work.
    In this demo I am using the Select nodes option, once you select the device and click To add icon, your device will appear in Selected nodes section. Now click on Next.
  5. You can save job logs to check whether the configuration has been saved for all devices or not. If a device fails, we can display the error message to troubleshoot the issue with that specific device. You can save the log to a file by choosing Save the results to a file, and validate the configured path to store the log. If email notification is required, select Email results, configure email settings and click next.
  6. In this section, choose the types of configuration files you want to back up based on your needs. You can configure Send configuration change notifications to receive all configuration changes. We have a dedicated document on monitoring configuration changes in real time using NCM; click on this link to configure the same.
    When finished, click Next.
  7. In the Exam section, review the configured task and click Finish to save labor.

Now that our job is ready, once the scheduled time arrives, the job will run and save the backup of the configuration to the database along with the location of the archive folder.

Now validate whether the job runs successfully or not.

Validate configuration backup task

Once your scheduled time is over, and if you go to Jobs, you can see the date and time the job ended under Last date of execution. With this we can make sure the job is done.

Now if you click on the Story icon, it will show the job log. In the job log, we can see if the configuration was saved successfully or not. As you can see in the log below, there is an error.

The error details are mentioned below, NCM failed to download device state configuration. Device status configuration will be downloaded only for applicable devices. We can use this error message to troubleshoot configuration backup issues. We can see Downloaded and Saved Runtime Configurationso our device is backed up.

To validate if the configuration is saved or not, go to Configuration Management in the Network Configuration submenu. Expand the device name to see the available backups, since the device was successfully backed up, we can see the backups under the device.

Now let’s move to the archive folder and check whether the backup is stored or not. The operating and startup configuration of the device is correctly saved.

This is how we can use the Works feature available in Solarwinds NCM to automate network configuration backup activity. The job will run on schedule and store the backups in our configured archive location. Network administrators can use these backups for validation or restoration etc. Click this link to learn more about Solarwinds NCM and download it.

[ad_2]
Source link