Table of Contents

Getting started with configuration backups

This tutorial will show how you can use IDP to retrieve and store device configurations.

Expected duration: 20 minutes.

Note

The content and screenshots for this tutorial were created using DataMiner version 10.4.3 and IDP version 1.5.0.

Prerequisites

  • The DataMiner System used for this tutorial has to meet the following requirements:

  • A shared folder must be accessible from the system to store the backups.

Important

Do not use a DaaS system to follow this tutorial. On DaaS systems, it is not possible to configure a shared folder or access a shared folder outside the DaaS system.

Overview

Step 1: Create the CI Type

First, a CI Type needs to be created for IDP to know how to manage the element or device.

Instead of creating the CI Type from scratch, you will generate it based on an existing connector. In this example, the Generic Switch connector is used, but you can use any other connector.

  1. Deploy the connector to start from:

    1. Deploy the latest version of the Generic Switch connector from the DataMiner Catalog.

    2. Make sure the latest version is set as production.

      Generic Switch connector

  2. Generate the CI Type:

    1. Open the IDP app.

    2. Go to Admin > CI Types.

    3. Above the table on the right, click Generate to start the wizard.

      Start to generate the CI Type script

    4. In the wizard, select the connector and click Generate.

      Select the connector

    5. Click Finish to close the wizard.

    6. Switch off the Show All button in the top-right corner to locate the generated CI Type more easily.

      Generate the CI Type

Step 2: Create an element and manage it

  1. Create an element that uses the connector you deployed in the previous step.

    You can enter any IP address in the IP address/host field, for example 127.0.0.1.

  2. In the IDP app, go to Inventory > Unmanaged.

  3. Click Refresh to refresh the table.

    Note

    Make sure Detected CI Type contains the generated CI Type. If it does not, confirm that the element was created with the production version.

  4. Select the recently created element, and click Manage.

    Unmanaged element

  5. Go to Inventory > Managed to confirm the element is now managed by IDP.

    Managed element

Step 3: Set up the configuration archive

For IDP to store the configurations, it needs to access a local folder or a shared folder.

  1. In the DataMiner IDP app, go to Admin > Configuration.

  2. Under DataMiner Configuration Archive, specify the settings to access the local or shared folder.

    • Click the triangle button in the top right corner to specify a value for each setting.

    • Specify the credentials for a user account that has access to the specified path.

    Setup configuration archive credentials

  3. Click Connect.

At this point, you have already generated the CI Type, created an element and added it to the managed elements, and configured IDP to access the archive. In the next step, you will create the script that will retrieve the configuration and send it to IDP.

Step 4: Create the script to retrieve the configuration backup

When IDP is installed it comes with an example script on how to retrieve the configuration and send it to IDP. You will now need to duplicate this script and change it to retrieve the parameter values from the element created in step 2.

  1. Duplicate the example configuration backup script:

    1. Go to the Automation module.

    2. Expand the folders until you reach DataMiner Solutions > IDP > CI Type Management > Configuration Management > Backup.

    3. Within this folder, duplicate the IDP_Example_Custom_ConfigurationBackup script, and rename it.

      Duplicated script

  2. Update the script to retrieve the parameter values from the element you created earlier:

    1. Open the script.

    2. Go to the GetDeviceFullBackupAsText function.

    3. Change the function to retrieve the values from parameters 502 (System Contact) and 504 (System Location).

      private static string GetDeviceFullBackupAsText(IActionableElement element)
      {
          StringBuilder builder = new StringBuilder();
      
          builder.Append(Convert.ToString(element.GetParameter(502)));
          builder.Append("\n");
          builder.Append(Convert.ToString(element.GetParameter(504)));
      
          return builder.ToString();
      }
      
      Note

      Note that the above-mentioned parameters 502 and 504 are parameters of the suggested connector. If you have chosen another connector, you should adapt these parameters accordingly.

    4. Go to the CreateAndSendBackup function.

    5. Change it to only include the fullBackupData.

      private void CreateAndSendBackup(IEngine engine)
      {
          string fullBackupData = BackupDevice(engine, GetDeviceFullBackupAsText);
          backupManager.SendBackupContentToIdp(fullBackupData);
      }
      
    6. Click Save script.

  3. Open the element you created in step 2, and assign values to parameters 502 (System Contact) and 504 (System Location).

    Set parameter values

Step 5: Retrieve the device configuration

  1. Open the DataMiner IDP app.

  2. Go to Admin > CI Types > Configuration Management.

  3. Select the backup script.

    Select the backup script

    Note

    If you cannot see the script in the dropdown, go to Admin > Settings and click the refresh button for the Backup Script Folder setting.

    Refresh backup script folder

  4. Go to Configuration > Summary.

  5. Select the element, and click Backup.

    Run the script

    This will open a wizard.

  6. Select a type (e.g. Running), click Next, and then click Finish.

    Confirmation pop-up script

    Tip

    See also: Configuration types

  7. Select the element again, and click Show backups.

  8. Select the recent backup, and click Show content.

    Backup content

Congratulations, you have saved your first device configuration with IDP.

Note