none
DPM 2012 SP1 - Tapes do not match in DPMSQL db with Physical Tapes RRS feed

  • Question

  • Recently reinstalled DPM 2012 SP1 UR6, restored the DPMDB and ran the following to verify the tapes in the DB match the physical tapes. Saw that they do not match.

    Get-ProtectionGroup –DPMServer DPM Server| get-tape | select barcode | sort | out-file C:\Temp\DPMTapeBarcodeList.txt

    Then ran DPMRemappingTool and that did not correct the problem.

    Removed the Cleaning Tape first, but kept the rest of the tapes in the Library. None were in the Drive. Have a single tape drive.

    Do all of the tapes need to be removed first? Would this help, or just keep one in? Should I do something else to get these in sync?

    The time to get all the backup jobs in sync took days and the reason for the reinstall was that when I tried to go to DPM 2012 R2 UR2 it failed.  Since this server was updated since DPM2007 I thought it was time to reinstall and start fresh, but it seems like there are so many old entries in the DPMDB that need to be cleaned up, I just need some help before I try to update again. I'm also uninstalled SQL 2008 R2 and went to SQL 2012 latest version.

    Thanks for any help.

    Denise

    Wednesday, July 9, 2014 7:27 PM

Answers

  • Hi,

    <snip>
    Get-ProtectionGroup –DPMServer DPMServerName | get-tape | select barcode | sort | out-file C:\Temp\DPMTapeBarcodeList.txt
    >snip<

    The above script will only return tapes that have been written to and show a protection group listed in the GUI.  Tapes that show Unknown, imported, free will not be included in that output.

    You will need to do the following:

    $library = get-dpmlibrary -dpmserver (&hostname)
    get-tape -dpmlibrary $library | select barcode | sort | out-file C:\Temp\DPMTapeBarcodeList.txt


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.


    Thursday, July 10, 2014 6:59 PM
    Moderator

All replies

  • Hi,

    Are you simply saying that the barcode that DPM is showing for the tape in the slots does not match the barcode physically on the tapes ?

    After a fast inventory - the barcodes should be read and GUI updated.

    Below SQL script output should match the GUI.

     
      select SlotNum = SlotNum+1,Label,BarcodeValue from dbo.tbl_MM_Media
      where LibraryId =(SELECT libraryid FROM dbo.tbl_MM_Library
      where IsOffline = 0 and LibraryType =0)
      order by SlotNum



    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, July 10, 2014 12:13 AM
    Moderator
  • Only 7 of the 17 barcodes (tapes) in the DPM GUI are listed in the powershell output after I ran DPMRemappingTool and after running the fast Inventory.

    This is the command I ran to get the output from the DPMDB:

    Get-ProtectionGroup –DPMServer DPMServerName | get-tape | select barcode | sort | out-file C:\Temp\DPMTapeBarcodeList.txt

    Shouldn't all of the tapes that are in the DPM Gui show in this output?

    Thursday, July 10, 2014 6:21 PM
  • Hi,

    <snip>
    Get-ProtectionGroup –DPMServer DPMServerName | get-tape | select barcode | sort | out-file C:\Temp\DPMTapeBarcodeList.txt
    >snip<

    The above script will only return tapes that have been written to and show a protection group listed in the GUI.  Tapes that show Unknown, imported, free will not be included in that output.

    You will need to do the following:

    $library = get-dpmlibrary -dpmserver (&hostname)
    get-tape -dpmlibrary $library | select barcode | sort | out-file C:\Temp\DPMTapeBarcodeList.txt


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.


    Thursday, July 10, 2014 6:59 PM
    Moderator
  • Thank you! That is what I was looking for.
    Thursday, July 10, 2014 7:43 PM