DPM2012 SAN based recovery with EMC VNX SAN
-
Friday, November 16, 2012 2:02 AM
Hi team, I found there is a post regarding the
integration between DPM and EMC SAN storage, but it's
for DPM 2007 . And my test to run this script got
errors when I ran it on my DPM 2012 management shell.
I am wondering if anyone can provide a version for
DPM 2012,or any document that I can refer to for
manual configuration with DPM2012 GUI to acheive the
SAN based recovery. Thanks! -KF
link to the documenthttp://www.emc.com/collateral/hardware/white-
papers/h4260-clariion-stor-sol-ms-dpm-wp.pdf
==============begin of the script
======================
if(!$args[0])
{
if(!$DSName)
{
$DSName = read-host "DatasourceName:"
}
}
else
{
if(("-?","-help") -contains $args[0])
{
write-host Usage::
write-host CreateShadowCopy.ps1 DatasourceNameProtectionGroupName
write-host Help::
write-host Creates a shadow copy for the givenDatasource
write-host
exit 0
}
else
{
write-host "Usage -? for Help"
exit 1
}
}
if(!$PGName)
{
$PGName = read-host "ProtectionGroupName:"
}
$dpmname = &"hostname"
connect-dpmserver $dpmname
$pg = get-protectiongroup -dpmservername $dpmname
if (!$pg)
{
write-error "Cannot get the protectionGroup"
disconnect-dpmserver $dpmname
exit 1
}
$mypg = $pg | where {$_.FriendlyName -eq $PGName}
if (!$mypg)
{
write-error "Cannot get the requestedprotectionGroup"
disconnect-dpmserver $dpmname
exit 1
}
$ds = get-datasource -protectiongroup $mypg
if (!$ds)
{
write-error "Cannot get the datasources for the PG"
disconnect-dpmserver $dpmname
exit 1
}
$myds = $ds | where {$_.Name -eq $DSName}
if (!$myds)
{
write-error "Cannot get the required Datasource"
disconnect-dpmserver $dpmname
exit 1
}
$j = new-recoverypoint -datasource $myds -DiskRecoveryPointOption
WithoutSynchronize -Disk
if (!$j)
{
write-error "Cannot get the required Datasource"
disconnect-dpmserver $dpmname
exit 1
}
$jobtype = $j.jobtype
while (! $j.hascompleted )
{
write-host "Waiting for $jobtype job to complete...";start-sleep 5
}
if($j.Status -ne "Succeeded")
{
write-error "Job $jobtype failed..."
}
Write-host "$jobtype job completed..."
disconnect-dpmserver $dpmname
exit===============end of the script=================
Thanks and best regards, -- KF
All Replies
-
Friday, November 16, 2012 2:56 AMModerator
Hi,
What is the error you are receiving ?
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.
-
Friday, November 16, 2012 1:31 PM
A lot of errors prompted... I didn't take screenshot that day. What I am looking for is not to troubleshoot those errors, it may take too much time. I just want to know if there is proper version of script for dpm 2012, which can work with EMC VNX. or any other solution,eg. GUI based configuration ,or 3rd party tool, to do this type of integration. Better officially supported by Microsoft. If not supported, the "SAN based recovery" option in the DPM is really silly. Any advice please? Thanks
Thanks and best regards, -- KF
-
Monday, November 19, 2012 8:00 AM
Here is the error , please advise,thanks!
dpmserver.domain.com domain.com
New-DPMRecoveryPoint : Missing an argument for parameter 'DiskRecoveryPointOpti
on'. Specify a parameter of type 'Microsoft.Internal.EnterpriseStorage.Dls.Engi
neUICommon.EngineConstants.DbEnums+CreateDiskRecoveryPointOption' and try again
.
At C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin\CreateShadowCopy.p
s1:62 char:66
+ $j = new-recoverypoint -datasource $myds -DiskRecoveryPointOption <<<<
+ CategoryInfo : InvalidArgument: (:) [New-DPMRecoveryPoint], Par
ameterBindingException
+ FullyQualifiedErrorId : MissingArgument,Microsoft.Internal.EnterpriseSto
rage.Dls.UI.Cmdlet.ProtectionCmdLets.CreateRecoveryPointThe term 'WithoutSynchronize' is not recognized as the name of a cmdlet, functi
on, script file, or operable program. Check the spelling of the name, or if a p
ath was included, verify that the path is correct and try again.
At C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin\CreateShadowCopy.p
s1:63 char:19
+ WithoutSynchronize <<<< -Disk
+ CategoryInfo : ObjectNotFound: (WithoutSynchronize:String) [],
CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundExceptionC:\Program Files\Microsoft System Center 2012\DPM\DPM\bin\CreateShadowCopy.ps1
: Cannot get the required Datasource
At line:1 char:23
+ .\CreateShadowCopy.ps1 <<<<
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorExcep
tion
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio
n,CreateShadowCopy.ps1PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> .\CreateShadowCopy
.ps1Thanks and best regards, -- KF
-
Monday, November 19, 2012 11:29 PM
What is the parameter you are giving as DatasourceName and ProtectionGroupName?
I just run the script on my DPM 2012 build 4.0.1920.0 just fine.
Which DPM Build version are you running (You can get that by clicking on About DPM in DPM Administrator Console)
Thanks, Wilson Souza - MSFT This posting is provided "AS IS" with no warranties, and confers no rights
-
Tuesday, November 20, 2012 5:36 AMdatasourcename is the DAG's DB name, and protection group name is the one I created in DPM. I thought the latest is 1904? your 1920 is from some patch? I downloaded this version 3 months ago,should be quite new?it's evaluation.any advice or manual for this script?thanks
Thanks and best regards, -- KF
-
Tuesday, November 20, 2012 6:57 AM
Here is the link for DPM 2012 RU 3
http://www.microsoft.com/en-us/download/details.aspx?id=35372
Can you share the output of the script below. It is pretty much the script you posted without the creating shadow copy piece and extra code to give more details on the selected data source.
param([string] $DSName, [string] $PGName) if(!$args[0]) { if(!$DSName) { $DSName = read-host "DatasourceName:" } } else { if(("-?","-help") -contains $args[0]) { write-host Usage:: write-host CreateShadowCopy.ps1 DatasourceName ProtectionGroupName write-host Help:: write-host Creates a shadow copy for the given Datasource write-host exit 0 } else { write-host "Usage -? for Help" exit 1 } } if(!$PGName) { $PGName = read-host "ProtectionGroupName:" } $dpmname = &"hostname" connect-dpmserver $dpmname $pg = get-protectiongroup -dpmservername $dpmname if (!$pg) { write-error "Cannot get the protectionGroup" disconnect-dpmserver $dpmname exit 1 } $mypg = $pg | where {$_.FriendlyName -eq $PGName} if (!$mypg) { write-error "Cannot get the requested protectionGroup" disconnect-dpmserver $dpmname exit 1 } $ds = get-datasource -protectiongroup $mypg if (!$ds) { write-error "Cannot get the datasources for the PG" disconnect-dpmserver $dpmname exit 1 } $myds = $ds | where {$_.Name -eq $DSName} if (!$myds) { write-error "Cannot get the required Datasource" disconnect-dpmserver $dpmname exit 1 } write-host "Datasource count.:" $myds.count write-host "Datasource Name..:" $myds.name write-host "Protection Group.:" $myds.ProtectionGroupName write-host "Version..........:" $myds.Version write-host "Disk Allocation..:" $myds.DiskAllocation
Thanks, Wilson Souza - MSFT This posting is provided "AS IS" with no warranties, and confers no rights
- Edited by Wilson SouzaMicrosoft Employee Tuesday, November 20, 2012 6:58 AM update
-
Wednesday, November 21, 2012 7:48 AM
Thanks. I found my DPM version is 4.0.1908 in the testing lab. I tested with the script above with name testps.ps1 and got no error for data source of c:\ of a SCO server. In dpm 2007 I could see datasource name directly but now it seems I have to use command line to find the data source name. is it the only way or correct? I run the createshadowcopy.ps1 on it with dpm server name "DPM' and data source "c:\" , and got the errors below. the consistance check of c:\ was fine. i did a simple fold backup for c:\ of SCO and system state with a custom volume. Please advise what problem with this ps1 script. Thanks!
PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> get-datasource
cmdlet Get-DPMDatasource at command pipeline position 1
Supply values for the following parameters:
DPMServerName: dpmComputer Name
-------- ----
SCO C:\
DPM ReportServer$MSDPM2012EVAL
DPM DPMDB
SCO \\?\Volume{f35b2553-2a82-11e2-a90e-806e6f6e6963}\
DPM master
DPM C:\
DPM System Protection
DPM model
SCO System Protection
DPM ReportServer$MSDPM2012EVALTempDB
DPM \\?\Volume{0a11dcf4-3305-11e2-a01c-806e6f6e6963}\
DPM msdb
PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin>PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> .\createshadowcopy.ps1
DatasourceName:: c:\
ProtectionGroupName:: pg1Name Domain
---- ------
dpm.mydomain.com.sg mydomain.com.
New-DPMRecoveryPoint : Parameter set cannot be resolved using the specified named parameters.
At C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin\createshadowcopy.ps1:65 char:23
+ $j = new-recoverypoint <<<< -datasource $myds -
+ CategoryInfo : InvalidArgument: (:) [New-DPMRecoveryPoint], ParameterBindingException
+ FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.ProtectionCmdLets.CreatThe term 'DiskRecoveryPointOption' is not recognized as the name of a cmdlet, function, script file, or operable program. Chec
again.
At C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin\createshadowcopy.ps1:67 char:24
+ DiskRecoveryPointOption <<<<
+ CategoryInfo : ObjectNotFound: (DiskRecoveryPointOption:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundExceptionThe term 'WithoutSynchronize' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
.
At C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin\createshadowcopy.ps1:68 char:19
+ WithoutSynchronize <<<< -Disk
+ CategoryInfo : ObjectNotFound: (WithoutSynchronize:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundExceptionC:\Program Files\Microsoft System Center 2012\DPM\DPM\bin\createshadowcopy.ps1 : Cannot get the required Datasource
At line:1 char:23
+ .\createshadowcopy.ps1 <<<<
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,createshadowcopy.ps1PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> .\createshadowcopy.ps1
PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin>
PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin>
PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin>
PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> .\testps.ps1
DatasourceName:: \\?\Volume{f35b2553-2a82-11e2-a90e-806e6f6e6963}\
ProtectionGroupName:: pg1Name Domain
---- ------
dpm.mydomain.com.sg mydomain.com.
C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin\testps.ps1 : Cannot get the required Datasource
At line:1 char:13
+ .\testps.ps1 <<<<
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,testps.ps1PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> .\testps.ps1
DatasourceName:: c:\
ProtectionGroupName:: pg1Name Domain
---- ------
dpm.mydomain.com.sg mydomain.com.
Datasource count.:
Datasource Name..: C:\
Protection Group.: PG1
Version..........: 0.0
Disk Allocation..: Replica volume: 20.00 GB allocated, 328.03 MB used | Recovery point volume: 5.00 GB allocated, 373.54 MB us
PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> .\createshadowcopy.ps1
DatasourceName:: c:\
ProtectionGroupName:: pg1Name Domain
---- ------
dpm.mydomain.com.sg mydomain.com.
New-DPMRecoveryPoint : Parameter set cannot be resolved using the specified named parameters.
At C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin\createshadowcopy.ps1:65 char:23
+ $j = new-recoverypoint <<<< -datasource $myds -
+ CategoryInfo : InvalidArgument: (:) [New-DPMRecoveryPoint], ParameterBindingException
+ FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.ProtectionCmdLets.CreatThe term 'DiskRecoveryPointOption' is not recognized as the name of a cmdlet, function, script file, or operable program. Chec
again.
At C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin\createshadowcopy.ps1:67 char:24
+ DiskRecoveryPointOption <<<<
+ CategoryInfo : ObjectNotFound: (DiskRecoveryPointOption:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundExceptionThe term 'WithoutSynchronize' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
.
At C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin\createshadowcopy.ps1:68 char:19
+ WithoutSynchronize <<<< -Disk
+ CategoryInfo : ObjectNotFound: (WithoutSynchronize:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundExceptionC:\Program Files\Microsoft System Center 2012\DPM\DPM\bin\createshadowcopy.ps1 : Cannot get the required Datasource
At line:1 char:23
+ .\createshadowcopy.ps1 <<<<
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,createshadowcopy.ps1PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> get-datasource
cmdlet Get-DPMDatasource at command pipeline position 1
Supply values for the following parameters:
DPMServerName: dpmComputer Name
-------- ----
SCO C:\
DPM ReportServer$MSDPM2012EVAL
DPM DPMDB
SCO \\?\Volume{f35b2553-2a82-11e2-a90e-806e6f6e6963}\
DPM master
DPM C:\
DPM System Protection
DPM model
SCO System Protection
DPM ReportServer$MSDPM2012EVALTempDB
DPM \\?\Volume{0a11dcf4-3305-11e2-a01c-806e6f6e6963}\
DPM msdb
PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin>Thanks and best regards, -- KF
-
Wednesday, November 21, 2012 7:56 AM
What is the output of the following command?
get-datasource (&hostname) | ? { $_.ProtectionGroupName -eq 'pg1' } | ft -autoThanks, Wilson Souza - MSFT This posting is provided "AS IS" with no warranties, and confers no rights
-
Wednesday, November 21, 2012 8:32 AM
thanks wilson!
I deteled pg1 and created a new pg, called PG2 to backup a sql servers's MODEL Db. here is the output:
PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> get-datasource (&hostname) | ? { $_.ProtectionGroupName -eq 'pg2
Computer Name Type
-------- ---- ----
SQL Server (MSSQLSERVER) model SQL Server 2008 database
PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> .\createshadowcopy.ps1
DatasourceName:: model
ProtectionGroupName:: pg2Name Domain
---- ------
dpm.mydomain.com.sg mydomain.com.
New-DPMRecoveryPoint : Parameter set cannot be resolved using the specified named parameters.
At C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin\createshadowcopy.ps1:65 char:23
+ $j = new-recoverypoint <<<< -datasource $myds -
+ CategoryInfo : InvalidArgument: (:) [New-DPMRecoveryPoint], ParameterBindingException
+ FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.Internal.EnterpriseStorage.Dls.UI.Cmdlet.ProtectionCmdLets.CreatThe term 'DiskRecoveryPointOption' is not recognized as the name of a cmdlet, function, script file, or operable program. Chec
again.
At C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin\createshadowcopy.ps1:67 char:24
+ DiskRecoveryPointOption <<<<
+ CategoryInfo : ObjectNotFound: (DiskRecoveryPointOption:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundExceptionThe term 'WithoutSynchronize' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
.
At C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin\createshadowcopy.ps1:68 char:19
+ WithoutSynchronize <<<< -Disk
+ CategoryInfo : ObjectNotFound: (WithoutSynchronize:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundExceptionC:\Program Files\Microsoft System Center 2012\DPM\DPM\bin\createshadowcopy.ps1 : Cannot get the required Datasource
At line:1 char:23
+ .\createshadowcopy.ps1 <<<<
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,createshadowcopy.ps1PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin>
Thanks and best regards, -- KF
-
Thursday, November 22, 2012 3:02 AMHi I have just done the update with DataProtectionManager2012-KB2751230. and still same error.
Thanks and best regards, -- KF
-
Thursday, November 22, 2012 4:01 AM
Can you edit your file and replace line 62 with this one?
$j = new-recoverypoint -datasource $myds -DiskRecoveryPointOption WithoutSynchronize -Disk
Note: line 62 should be exactly the same as the one above. I just want to be sure that we don't have invalid characters on the script you are running....Thanks, Wilson Souza - MSFT This posting is provided "AS IS" with no warranties, and confers no rights
- Marked As Answer by kongfupanda Thursday, November 22, 2012 7:20 AM
-
Thursday, November 22, 2012 7:20 AM
Many thanks! You are right: the line
==============================
$j = new-recoverypoint -datasource $myds -DiskRecoveryPointOption WithoutSynchronize -Disk
===============================
this line above should be in one line only,instead of being spit to 2 or 3 lines. After this change, no more error.
PS C:\Program Files\Microsoft System Center 2012\DPM\DPM\bin> .\createshadowcopy2.ps1
DatasourceName:: model
ProtectionGroupName:: pg2Name
----
dppm.domain.comWaiting for ShadowCopy job to complete...
ShadowCopy job completed...Thanks!
Thanks and best regards, -- KF
- Marked As Answer by kongfupanda Thursday, November 22, 2012 7:20 AM
-
Thursday, November 22, 2012 8:09 AMby the way, the result doesn't show where the shaddow copy goes. does it create a copy and save it somewhere in dpm volume directory? can I use it for SAN based recovery for simulation? Thanks
Thanks and best regards, -- KF
-
Thursday, November 22, 2012 8:11 AMshadow copy will go to the recovery point volume in one of the disks used as DPM Storage Pool.
Thanks, Wilson Souza - MSFT This posting is provided "AS IS" with no warranties, and confers no rights
-
Friday, November 23, 2012 3:07 AM
Thanks.I created 2 customised volumes for testing. one is rep, one is snap. but the volume of snap is empty after i ran the createshowcopy ps. where I can find it and how can I use it for SAN based restore? thanks!
Thanks and best regards, -- KF
-
Friday, November 23, 2012 6:19 AM
DPM will use the software provider to create the snapshot. This means that the recovery point will be create on the recovery volume defined within DPM.
If you want to use SAN hardware snapshot you will need to use SAN tools to snap an exposed snapshot (DPMBACKUP.EXE -replicas)
Thanks, Wilson Souza - MSFT This posting is provided "AS IS" with no warranties, and confers no rights
-
Friday, November 23, 2012 8:37 AMthanks.but where is the shadow copy that PS1 created? why I couldnt see it in snap shot custom vol? Once I find it, how can I utilise it for recovery ? either software provider or hardware snap?
Thanks and best regards, -- KF
-
Friday, November 23, 2012 8:51 AMTo see the file you need to enable windows explorer to show hidden files & folders. After that you should see a system volume information folder on the root of the volume. If you give permission for you to browse that folder, you should see a file for every recovery point you had created. The snapshot is an unreadable file. To see what is inside you need to mount it (you can use diskshadow for that) or use DPM administrator console, recovery tab....
Thanks, Wilson Souza - MSFT This posting is provided "AS IS" with no warranties, and confers no rights
-
Sunday, November 25, 2012 11:10 PMModerator
Hi,
You need to make a transportable hardware snapshot of the replica and recovery point disks then expose it on the production exchange server, then when you choose the option to perform SAN based recovery, DPM will copy the recovery point from the local shadow copy to the production lun by doing the copy from SAN disk to SAN disk.
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.
- Edited by Mike JacquetMicrosoft Employee, Moderator Sunday, November 25, 2012 11:11 PM
-
Friday, February 22, 2013 12:22 PM
Hi Mike
So cool but I am looking a long time a go but nobody can say my how it works.
" transportable hardware snapshot of the replica and recovery point disks then expose it on the production exchange server, then when you choose the option to perform SAN based recovery"
We have Dell Equalogic and Harware Snapshot are working. But I want user San based recovery and this will not working.
What I need to do?
Roendi

