Create Protection Groups for Disk-Based Backups

Creates a protection group, with disk-based protection, for a simple folder. It can be extended to different data sources like Microsoft Exchange, SQL, SharePoint, system state or virtual servers. The synchronization frequency and retention ranges can be modified to suit different needs.

Because the script protects a sub-folder in a volume, the code uses the CalculateSize parameter in Get-DataSourceDiskAllocation; this calculates the exact size needed for all the items in that folder. This parameter is not needed when protecting an application like Exchange/SQL or protection the entire file system volume.

It’s easy for organizations to believe that disk will solve their backup problems. But some organizations are starting to discover that while disk solved some of their backup problems, they are still not realizing the full reductions in backup times and improved performance rates on their application servers that they may have initially expected. If an organization finds itself in this predicament, then it probably behooves them to take a closer look at their backup architecture and determine exactly how much backup traffic is going across their corporate LAN.

DPM enables an organization to create a two-tiered backup solution that combines the convenience and reliability of disk for short-term backup where most recovery requests are concentrated with the security of tape or other removable medium for long-term archiving. This two-tiered system helps to alleviate the problems associated with tape backup solutions, while still allowing for the maintenance of long-term off-site archives.

To address this situation, VTL Backup Accelerator that gives organizations a mechanism to address all three of these potential bottlenecks without requiring organizations to virtualize their storage infrastructure. By using DPM to provide disk-based short-term backups, you can improve the reliability and efficiency of your overall backup solution in the following ways:

Provide nearly continuous protection. With legacy tape backup tools, backing up file servers to tape more than once each day generally is not feasible. For this reason, organizations traditionally have scheduled full backups once each week, with incremental backups performed daily. This schedule risks the permanent loss of any work that is performed between the nightly backups. DPM can back up data to the central DPM server every hour during the day. This can reduce potential data loss from one day to one hour. DPM also protects files that are open during the backup process, ensuring a complete, reliable backup of all protected data.

Improve the reliability of recoveries. The reliability of data recovery with disk-based protection is significantly better than that of tape-based systems. With DPM, an administrator can quickly and easily confirm the success of a backup by simply browsing for the data on disk.

Simplify recovery operations. Because DPM provides disk-based protection, recovering data is a simple matter of browsing through previous versions of shares or folders on the DPM server and copying selected versions directly to the protected file server.

Reduce the time required for recoveries. A typical file recovery from tape takes hours and can be costly, and administrators in a medium-size data center can usually expect to perform 10 to 20 or more of these recoveries each month. DPM can perform this type of recovery in minutes, saving time for administrators and for information workers, who spend less time waiting for their files to be recovered.

Enable users to recover their own files. Recovery and backup processes typically involve multiple administrators, which adds to the time spent in data management and to the total cost of ownership. DPM enables users to independently retrieve previous versions of their files using the familiar Windows Explorer interface or any of the Microsoft Office 2003 applications. This capability increases productivity and significantly lowers administrative costs.

The following script creates a protection group with disk based protection, for a simple folder. It can be easily extended to add more data sources of different kinds like Microsoft Exchange, SQL, Sharepoint, System state or Virtual Servers. This script was contributed by the System Center Data Protection Manager (DPM). The Synchronization frequency and retention ranges etc. Can be easily modified to suit your needs. Also, since we are protecting a sub-folder in a volume, we are using the CalculateSize parameter in Get-DataSourceDiskAllocation, which would calculate the exact size needed for all the items in that folder. This is not needed when protecting an application like Exchange/SQL or protection the entire File system volume.

Script Code

Quote:# To D2D create PG and do the initial replication

# This script is for creating Disk to Disk PG for File System

# For details contact mukuls[at]microsoft[dot]com

# Create a .ps1 file with this script and run under DPM Management Shell

# Customize these values as per your environment

$dpmname = “DPMServername.somedomain.com”

$psname = “PSservername.somedomain.com”

$dsname = “G:\”

$poname = “G:\ProtectableFolder”

$pgname = “MyCLIPG”

function CreatePG

{

param($dpmname, $psname, $dsname, $poname, $pgname)

write-host “Creating a D->D PG –> $pgname…”

trap{“Error in execution… “;break}

&{

Write-Host “Getting PS: $psname from DPM: $dpmname”

$ps = Get-ProductionServer -DPMServerName $dpmname | where { ($_.machinename,$_.name) -contains $psname }

Write-Host “Running Inquiry on PS: $psname for datasource $dsname”

$ds = Get-Datasource -ProductionServer $ps -Inquire | where { ($_.logicalpath,$_.name) -contains $dsname }

Write-Host “Getting Child-datasource $poname from datasource $dsname”

$po = Get-ChildDatasource -ChildDatasource $ds -Inquire | where { ($_.logicalpath,$_.name) -contains $poname }

write-host “Create New PG …”

$pg = New-ProtectionGroup -DPMServerName $dpmname -Name $pgname

write-host “Adding child datasource…”

Add-childDatasource -ProtectionGroup $pg -ChildDatasource $po

write-host “Setting Protection Type…”

Set-ProtectionType -ProtectionGroup $pg -ShortTerm disk

write-host “Setting Policy Objective…retention range – 10Days, synchronizationFrequency 15”

Set-PolicyObjective -ProtectionGroup $pg -RetentionRangeInDays 10 -SynchronizationFrequency 15

write-host “Setting Policy Schedules …”

$ShadowCopysch = Get-PolicySchedule -ProtectionGroup $pg -ShortTerm| where { $_.JobType -eq “ShadowCopy” }

Set-PolicySchedule -ProtectionGroup $pg -Schedule $ShadowCopysch -DaysOfWeek mo -TimesOfDay 02:00

write-host “Setting Disk Allocation, with optimization (will take a few minutes to complete)”

Get-DatasourceDiskAllocation -Datasource $ds -Calculatesize

Set-DatasourceDiskAllocation -Datasource $ds -ProtectionGroup $pg

write-host “Setting Replica Creation Method …”

Set-ReplicaCreationMethod -ProtectionGroup $pg -NOW

write-host “Commiting PG”

Set-protectiongroup $pg

}

}

function waitforIRtoComplete

{

param($waittime)

write-host “Wait for IR to complete”

$val = $waittime/30

while($val -gt 0)

{

Write-host “Wait for IR to complete… $val”

start-sleep 30

$val–

}

}

Connect-DPMServer -DPMServerName $dpmname;

createPG $dpmname $psname $dsname $poname $pgname;

waitforIRtoComplete 120

Disclaimer:-

The way file systems were designed to operate means that disk-based file system backups will become more fragmented over time. The sample scripts are not supported under any Microsoft standard support program or service. This leads to degraded performance unless regular defragmentation is performed.The sample scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. Also, tape-centric backup software does not always know what to do when a file system on a disk-as-disk target fills up. It often aborts the backup and requires additional management oversight. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.

Leave a Reply

Your email address will not be published. Required fields are marked *