LMS 3.2 duplicate devices after import

Unanswered Question
Feb 26th, 2010

Recently I tried to do a bulk import of devices in my DCR.  What I did was to export all the data into a CSV file, modify the hostname and display name so i could put an identifier on there, and then re-import in the database.  Instead of updating all the devices it added duplicates in for them all.  How do I resolve this so I dont have the duplicates.


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
CJasztrabTMW Fri, 02/26/2010 - 12:15

The following fields were exported and had values.  I changed host_name and display_name to different values and reimported the csv file.  I now have duplicate devices for each router.  One for example is 0001_RTR.company.com and the other is MSP_0001_RTR.company.com.  The MSP_ is the part i added onto the hostname and display name.   management_ip_address      host_name      domain_name      display_name      sysObjectID      mdf_type      snmp_v2_ro_comm_string      snmp_v2_rw_comm_string primary_password primary_enable_password   chris

Joe Clarke Sat, 02/27/2010 - 10:52

DCR is using the display name attribute as the unique identifier for devices.  Therefore, when you change that field, DCR thinks the device entry is new.  I filed CSCtf29117 to request an enhancement to allow exporting of the DCR device ID which would facilitate being able to change display name in bulk like this.

As a workaround in the time being, you would need to use the web interface to change the display name of each device individually.  You could also script the dcrcli command line interface to update.  For example, get all the DCR IDs using the lsids command, then foreach one, update the display_name attribute.  In pseudo-code:

foreach id $(dcrcli -u admin cmd=lsids all)


    current_display_name = get_disp_name($id)

    dcr_id = get_dcr_id($id)

    dcrcli -u admin cmd=mod id=$dcr_id -a display_name="MSP_$current_display_name"



This Discussion