(DP) Support Tip: Importing media from a StoreOnce store.

First of all, it is important to understand that the name of a slot of a Catalyst device in Data Protector is equal to the name of the corresponding item on the store. Typically it looks like this: 3ef5dcb2_5645d8f4_11d4_0001. Please note the difference with the “Medium ID” which is looking similar but which is using colons rather than underscores, e.g. 3ef5dcb2:5645d8f5:11d4:0002. Also note the numbers for the slot ID and the Medium ID are looking similar, but are typically slightly different.

Now, when a medium is missing in the IDB, but the related item is still available on the store, it is possible to import the medium (either through the GUI or CLI). However, a slot is needed first. In some situations, the (empty) slot may still be there. The first slot in this picture is an example:

 

 

This slot could be imported through GUI or CLI.

If the slot is, for whatever reason, not available then it needs to be created before the import can be executed. Use the following command for the slot creation:

omnimm -add_slots <DP device name> <SlotID>

“DP device name” is the StoreOnce device in DP or the library name. “SlotID” is the item name on the store. The following command can be used to list the items on the store:

omnib2dinfo -list_objects -b2ddevice <DP device name>


Koen Verbelen
Micro Focus Customer Care Specialist
If this answered your question, please mark it as "Suggest as Answer" or "Verify as Answer".
If you found this post useful, please give it a "Like".

  • Hi,

    For troubleshoot my SO issue, find this useful post for me understand how the Slot from DP related to SO Item.

    My problem here is the Catalyst Item shows in SO still occupied quite a lot space which those Item I cannot find in DP Store anymore, it suppose to already expired from IDB.

    So can I just delete those Catalyst Item from SO GUI to release the space ? And why this happen ? Can do clean up at fast way ?

    Thanks !

     

  • Hi,

    Yes, you can simply delete this item on the StoreOnce side. This is what should have happened at the time it was removed from the DP IDB. Most likely the store was not reachable at that time.

    The alternative is that you create the slot in DP and import it, as described in my original post. As a result, you can check the content and confirm it is expired and can be deleted. If it is indeed expired then this deletion should occur automatically during the daily cleanup session, just like it should have happened in the past. Make sure you have the latest bundle/patches installed.

    If you have a serious discrepancy between store and IDB then support can help you to sync them with a script. Please log a support case if this is required.

    Koen


    Koen Verbelen
    Micro Focus Customer Care Specialist
    If this answered your question, please mark it as "Suggest as Answer" or "Verify as Answer".
    If you found this post useful, please give it a "Like".

  • Instead of manually adding slots, why not ask the catalyst store for its objects and create a slot for each and every objcets found. When I had to reimport many, I did it like this:

    DP_DEVICE=somedevice; /opt/omni/bin/omnimm -add_slots "${DP_DEVICE}" $(/opt/omni/bin/omnib2dinfo -list_objects -b2ddevice="${DP_DEVICE}" </dev/null | awk '!/^Object Key/ {print $1}') 2>&1 | grep -v ^Duplicate

     

    If you want to do this for all your devices:

    /opt/omni/bin/omnidownload -list_libraries  | awk '!/^($|Library name|=====|Together : )/ {print $1}' | while read -r DP_DEVICE; do echo "Handling device ${DP_DEVICE}"; /opt/omni/bin/omnimm -add_slots "${DP_DEVICE}" $(/opt/omni/bin/omnib2dinfo -list_objects -b2ddevice="${DP_DEVICE}" </dev/null | awk '!/^Object Key/ {print $1}') 2>&1 | grep -v ^Duplicate; done

     

    If you like bash scripting, you can even avoid trying to add duplicates. Example:

    OBJECTS_ONLY_IN_STORE=($(comm -1 -3 <(/opt/omni/bin/omnidownload -library "${DP_DEVICE}" | sed -r -n -e 's/^[[:space:]] "([[:xdigit:]]{8}_[[:xdigit:]]{8}_[[:xdigit:]]{4}_[[:xdigit:]]{4})"$/\1/p' | sort) <(/opt/omni/bin/omnib2dinfo -list_objects -b2ddevice="${DP_DEVICE}" </dev/null | awk '!/^Object Key/ {print $1}' | sort)));
    if [ "${#OBJECTS_ONLY_IN_STORE[@]}" -gt 0 ]; then /opt/omni/bin/omnimm -add_slots "${DP_DEVICE}" "${OBJECTS_ONLY_IN_STORE[@]}"; fi

     

     

    And if you want to import as well, we can go full monty:

    /opt/omni/bin/omnidownload -list_libraries  | awk '!/^($|Library name|=====|Together : )/ {print $1}' |
    while read -r DP_DEVICE
    do
      echo "[${DP_DEVICE}] Handling device '${DP_DEVICE}'."

      OBJECTS_ONLY_IN_STORE=($(comm -1 -3 \
        --\
        <(/opt/omni/bin/omnidownload -library "${DP_DEVICE}" | sed -r -n -e 's/^[[:space:]] "([[:xdigit:]]{8}_[[:xdigit:]]{8}_[[:xdigit:]]{4}_[[:xdigit:]]{4})"$/\1/p' | sort)\
        <(/opt/omni/bin/omnib2dinfo -list_objects -b2ddevice="${DP_DEVICE}" </dev/null | awk '!/^Object Key/ {print $1}' | sort)
      ))
      echo "[${DP_DEVICE}] Found ${#OBJECTS_ONLY_IN_STORE[@]} object(s) in the StoreOnce that are not in Data Protector."

      if [ "${#OBJECTS_ONLY_IN_STORE[@]}" -le 0 ]
      then
        echo "[${DP_DEVICE}] No objects, so nothing to do."
        continue
      fi

      echo "Adding slots to Data Protector."
      /opt/omni/bin/omnimm -add_slots "${DP_DEVICE}" "${OBJECTS_ONLY_IN_STORE[@]}"

      GATEWAY="$(/opt/omni/bin/omnidownload -list_devices -detail | grep -B 10 '^LIBRARY "${DP_DEVICE}"' -m 1 | sed -r -n -e 's/^NAME[[:space:]]*"([^"] )"$/\1/p')"
      N=0
      WAITEVERY=10
      echo "[${DP_DEVICE}] Importing objects with batch size ${WAITEVERY}."
      for OBJECT in "${OBJECTS_ONLY_IN_STORE[@]}"
      do
        echo "[${DP_DEVICE}] Importing object '${OBJECT}'."
        /opt/omni/bin/omnimm -import "${GATEWAY}" -slot "${OBJECT}" &
        (( N % WAITEVERY == 0)) && wait
      done
    done

  • "Yes, you can simply delete this item on the StoreOnce side.. This is what should have happened at the time it was removed from the DP IDB. Most likely the store was not reachable at that time."

    I would advise against simply deleting. My suggestion: first configure DeleteUnprotectedMediaForce=0 in /etc/opt/omni/server/options/global so this type of problem won't happen again. And then re-add the slots and re-import the objects. Since DP will correclty discover the original protection, it will delete the objects during the regular maintenance task.

    The benefit of this hassle is that you are __sure__ that DP deletes only what can be deleted. If you manually delete objects, you can never be sure about it. That is why I advocate to go with "better safe than sorry". Just my two cents.