none
DPMSaveConfig and DPMCreateConfig scripts for DPM 2012

    Question

  • Found these great scripts online at Buchatech blog

    http://www.buchatech.com/2011/10/export-dpm-settings-to-xml-file/#comments

    I had to make a few mods to get past errors in Powershell and DPM2012, mainly to do with the snap-in and cmdlet names. However it's now failing with the following error when it gets to the function DoDatasources:

    [13:13:21] TRAP: DPMsaveConfig: Cannot bind parameter 'ProtectionGroup'. Cannot convert the "Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.Prote
    ctionGroup" value of type "Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.ProtectionGroup" to type "Microsoft.Internal.EnterpriseStorage.Dls.UI.O
    bjectModel.OMCommon.ProtectionGroup".
    Cannot bind parameter 'ProtectionGroup'. Cannot convert the "Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.ProtectionGroup" value of type "Micro
    soft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.ProtectionGroup" to type "Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.ProtectionGr
    oup".
    At C:\DPM-save-create-Config\DPMsaveConfig.ps1:399 char:46
    +     $dss = @(Get-DPMDataSource -ProtectionGroup $pg)

    Not sure what to change or check...it would be REALLY nice to be able to backup and recreate these.  I'm in the unfortunate situation of having to blow away and add new disks to DPM (long story - storage fiasco) and it would save a ton of effort if I could backup the datasources and protection config since I will need to remove all protection to accomplish the disk swap.

    Thanks,

    Casey



    Friday, July 12, 2013 8:32 PM

Answers

  • Just FYI - if you are performing a disk swap in DPM you can accomplish this with native tools....

    Make a backup of your DPMDB just as a precaution.  (From administrative command prompt run:  DPMBACKUP –DB)

    Stop and disable the DPM service in service control manager.

    From an administrative command prompt run diskpart.exe once in diskpart command console run these commands.

    Diskpart> List disk
    Diskpart> Select disk #  (Where # is one of the disks in the DPM Storage pool)
    Diskpart> Clean   (This will delete all volumes on the disk and make it UNINITIALIZED.

    Now repeat the select and clean commands until all DPM disks are wiped, then exit diskpart.

    Now rebuild the Array and once it’s healthy, initialize the disks in disk management.  If any disk is greater that 2TB, then convert it to GPT disk.

    Change the startup type of DPM Service back to automatic and start the DPM Service.

    Launch the DPM Console and under the management / Disks tab, ADD the new disks back into the DPM Storage pool.  DO NOT REMOVE THE MISSING DISKS AT THIS POINT.

    From an administrative command prompt, run:  dpmsync -reallocatereplica to recreate all the missing

    volumes, then run dpmsync –sync to clean up the DPM database to remove all the missing recovery points.

    Once Complete, run consistency checks against all the data sources and get everything green.

    Now you can remove the missing disk(s) in the DPM Storage pool.

    Normal protection should resume.

    At this point you can remove the old disk from the DPM console


    • Edited by IT Badger Monday, July 15, 2013 7:50 AM spelling mistake
    • Marked as answer by Casey.Robertson Thursday, July 25, 2013 11:10 PM
    Monday, July 15, 2013 7:48 AM

All replies

  • Found these great scripts online at Buchatech blog

    http://www.buchatech.com/2011/10/export-dpm-settings-to-xml-file/#comments

    I had to make a few mods to get past errors in Powershell and DPM2012, mainly to do with the snap-in and cmdlet names. However it's now failing with the following error when it gets to the function DoDatasources:

    [13:13:21] TRAP: DPMsaveConfig: Cannot bind parameter 'ProtectionGroup'. Cannot convert the "Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.Prote
    ctionGroup" value of type "Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.ProtectionGroup" to type "Microsoft.Internal.EnterpriseStorage.Dls.UI.O
    bjectModel.OMCommon.ProtectionGroup".
    Cannot bind parameter 'ProtectionGroup'. Cannot convert the "Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.ProtectionGroup" value of type "Micro
    soft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.ProtectionGroup" to type "Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.ProtectionGr
    oup".
    At C:\DPM-save-create-Config\DPMsaveConfig.ps1:399 char:46
    +     $dss = @(Get-DPMDataSource -ProtectionGroup $pg)

    Not sure what to change or check...it would be REALLY nice to be able to backup and recreate these.  I'm in the unfortunate situation of having to blow away and add new disks to DPM (long story - storage fiasco) and it would save a ton of effort if I could backup the datasources and protection config since I will need to remove all protection to accomplish the disk swap.

    Thanks,

    Casey



    Hi Casey,

    I have updated this recently for 2012 and was able to get this to work but I am still doing some testing. Can you reach out offline and I will see if I can help you? Contact me here: sbuchanan[at]buchatech.com.


    My Blog | www.buchatech.com | www.systemcenterportal.com
    If you found this post helpful, please give it a "Helpful" vote. If it answered your question, remember to mark it as an "Answer". This posting is provided "AS IS" with no warranties and confers no rights! Always test ANY suggestion in a test environment before implementing!


    Sunday, July 14, 2013 6:48 AM
    Moderator
  • Just FYI - if you are performing a disk swap in DPM you can accomplish this with native tools....

    Make a backup of your DPMDB just as a precaution.  (From administrative command prompt run:  DPMBACKUP –DB)

    Stop and disable the DPM service in service control manager.

    From an administrative command prompt run diskpart.exe once in diskpart command console run these commands.

    Diskpart> List disk
    Diskpart> Select disk #  (Where # is one of the disks in the DPM Storage pool)
    Diskpart> Clean   (This will delete all volumes on the disk and make it UNINITIALIZED.

    Now repeat the select and clean commands until all DPM disks are wiped, then exit diskpart.

    Now rebuild the Array and once it’s healthy, initialize the disks in disk management.  If any disk is greater that 2TB, then convert it to GPT disk.

    Change the startup type of DPM Service back to automatic and start the DPM Service.

    Launch the DPM Console and under the management / Disks tab, ADD the new disks back into the DPM Storage pool.  DO NOT REMOVE THE MISSING DISKS AT THIS POINT.

    From an administrative command prompt, run:  dpmsync -reallocatereplica to recreate all the missing

    volumes, then run dpmsync –sync to clean up the DPM database to remove all the missing recovery points.

    Once Complete, run consistency checks against all the data sources and get everything green.

    Now you can remove the missing disk(s) in the DPM Storage pool.

    Normal protection should resume.

    At this point you can remove the old disk from the DPM console


    • Edited by IT Badger Monday, July 15, 2013 7:50 AM spelling mistake
    • Marked as answer by Casey.Robertson Thursday, July 25, 2013 11:10 PM
    Monday, July 15, 2013 7:48 AM
  • Wanted to follow up ....

    The above procedure worked for me.  I had a few errors after the -reallocatereplica command.  So I ran dpmsync -sync anyway but it kept erroring out on 2 accounts in the security group MSDPMTrustedMachines.  Once I blew those out, I re-ran sync and re-ran the -reallocatereplica just for good measure.  They both worked.  

    Before fixing the above issues the DPM console would not open and the DPMAM service kept crashing.  

    As of right now all the protections groups are performing consistency checks and some have finished and things are looking good.  Final step will be to remove the missing disks from DPM and then from disk management on the server.

    Thanks again very very much!
    Thursday, July 25, 2013 11:10 PM
  • I got it working - but I will still contact you offline as I have some questions.  I ended up being able to use the other procedure in this thread and it worked well.  Didn't need to export/import the config.

    -Casey

    Thursday, July 25, 2013 11:11 PM