Skip to content

Commit e7aad6d

Browse files
Merge pull request #270614 from AbhishekMallick-MS/Mar-29-2024-Freshness1
Freshness - Deploy and manage backup using PS
2 parents bf8ce1e + 65a5932 commit e7aad6d

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

articles/backup/backup-dpm-automation.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
---
22
title: Use PowerShell to back up DPM workloads
33
description: Learn how to deploy and manage Azure Backup for Data Protection Manager (DPM) using PowerShell
4-
ms.topic: conceptual
5-
ms.date: 01/23/2017
6-
ms.custom: devx-track-azurepowershell
4+
ms.service: backup
5+
ms.topic: how-to
6+
ms.date: 03/29/2024
7+
ms.custom: devx-track-azurepowershell, engagement-fy24
78
author: AbhishekMallick-MS
89
ms.author: v-abhmallick
910
---
1011
# Deploy and manage backup to Azure for Data Protection Manager (DPM) servers using PowerShell
1112

12-
This article shows you how to use PowerShell to setup Azure Backup on a DPM server, and to manage backup and recovery.
13+
This article describes how to use PowerShell to set up Azure Backup on a DPM server, and to manage backup and recovery.
1314

14-
## Setting up the PowerShell environment
15+
## Set up the PowerShell environment
1516

1617
Before you can use PowerShell to manage backups from Data Protection Manager to Azure, you need to have the right environment in PowerShell. At the start of the PowerShell session, ensure that you run the following command to import the right modules and allow you to correctly reference the DPM cmdlets:
1718

@@ -194,7 +195,7 @@ Bandwidth usage can also be controlled with options of ```-WorkHourBandwidth```
194195
Set-DPMCloudSubscriptionSetting -DPMServerName "TestingServer" -SubscriptionSetting $setting -NoThrottle
195196
```
196197

197-
## Configuring the staging Area
198+
## Configure the staging Area
198199

199200
The Azure Backup agent running on the DPM server needs temporary storage for data restored from the cloud (local staging area). Configure the staging area using the [Set-DPMCloudSubscriptionSetting](/powershell/module/dataprotectionmanager/set-dpmcloudsubscriptionsetting) cmdlet and the ```-StagingAreaPath``` parameter.
200201

@@ -208,7 +209,7 @@ In the example above, the staging area will be set to *C:\StagingArea* in the Po
208209

209210
The backup data sent to Azure Backup is encrypted to protect the confidentiality of the data. The encryption passphrase is the "password" to decrypt the data at the time of restore. It's important to keep this information safe and secure once it's set.
210211

211-
In the example below, the first command converts the string ```passphrase123456789``` to a secure string and assigns the secure string to the variable named ```$Passphrase```. the second command sets the secure string in ```$Passphrase``` as the password for encrypting backups.
212+
In the example below, the first command converts the string ```passphrase123456789``` to a secure string and assigns the secure string to the variable named ```$Passphrase```. The second command sets the secure string in ```$Passphrase``` as the password for encrypting backups.
212213

213214
```powershell
214215
$Passphrase = ConvertTo-SecureString -string "passphrase123456789" -AsPlainText -Force
@@ -229,14 +230,14 @@ Set-DPMCloudSubscriptionSetting -DPMServerName "TestingServer" -SubscriptionSett
229230

230231
## Protect data to Azure Backup
231232

232-
In this section, you'll add a production server to DPM and then protect the data to local DPM storage and then to Azure Backup. In the examples, we'll demonstrate how to back up files and folders. The logic can easily be extended to backup any DPM-supported data source. All your DPM backups are governed by a Protection Group (PG) with four parts:
233+
In this section, you'll add a production server to DPM and then protect the data to local DPM storage and then to Azure Backup. In the examples, we'll demonstrate how to back up files and folders. The logic can easily be extended to back up any DPM-supported data source. All your DPM backups are governed by a Protection Group (PG) with four parts:
233234

234235
1. **Group members** is a list of all the protectable objects (also known as *Datasources* in DPM) that you want to protect in the same protection group. For example, you may want to protect production VMs in one protection group and SQL Server databases in another protection group as they may have different backup requirements. Before you can back up any datasource on a production server you need to make sure the DPM Agent is installed on the server and is managed by DPM. Follow the steps for [installing the DPM Agent](/system-center/dpm/deploy-dpm-protection-agent) and linking it to the appropriate DPM Server.
235236
2. **Data protection method** specifies the target backup locations - tape, disk, and cloud. In our example, we'll protect data to the local disk and to the cloud.
236237
3. A **backup schedule** that specifies when backups need to be taken and how often the data should be synchronized between the DPM Server and the production server.
237238
4. A **retention schedule** that specifies how long to retain the recovery points in Azure.
238239

239-
### Creating a protection group
240+
### Create a protection group
240241

241242
Start by creating a new Protection Group using the [New-DPMProtectionGroup](/powershell/module/dataprotectionmanager/new-dpmprotectiongroup) cmdlet.
242243

@@ -250,7 +251,7 @@ The above cmdlet will create a Protection Group named *ProtectGroup01*. An exist
250251
$MPG = Get-ModifiableProtectionGroup $PG
251252
```
252253

253-
### Adding group members to the Protection Group
254+
### Add group members to the Protection Group
254255

255256
Each DPM Agent knows the list of datasources on the server that it's installed on. To add a datasource to the Protection Group, the DPM Agent needs to first send a list of the datasources back to the DPM server. One or more datasources are then selected and added to the Protection Group. The PowerShell steps needed to achieve this are:
256257

@@ -275,16 +276,16 @@ Add-DPMChildDatasource -ProtectionGroup $MPG -ChildDatasource $DS
275276

276277
Repeat this step as many times as required, until you've added all the chosen datasources to the protection group. You can also start with just one datasource, and complete the workflow for creating the Protection Group, and at a later point add more datasources to the Protection Group.
277278

278-
### Selecting the data protection method
279+
### Select the data protection method
279280

280-
Once the datasources have been added to the Protection Group, the next step is to specify the protection method using the [Set-DPMProtectionType](/powershell/module/dataprotectionmanager/set-dpmprotectiontype) cmdlet. In this example, the Protection Group is setup for local disk and cloud backup. You also need to specify the datasource that you want to protect to cloud using the [Add-DPMChildDatasource](/powershell/module/dataprotectionmanager/add-dpmchilddatasource) cmdlet with -Online flag.
281+
Once the datasources have been added to the Protection Group, the next step is to specify the protection method using the [Set-DPMProtectionType](/powershell/module/dataprotectionmanager/set-dpmprotectiontype) cmdlet. In this example, the Protection Group is set up for local disk and cloud backup. You also need to specify the datasource that you want to protect to cloud using the [Add-DPMChildDatasource](/powershell/module/dataprotectionmanager/add-dpmchilddatasource) cmdlet with -Online flag.
281282

282283
```powershell
283284
Set-DPMProtectionType -ProtectionGroup $MPG -ShortTerm Disk –LongTerm Online
284285
Add-DPMChildDatasource -ProtectionGroup $MPG -ChildDatasource $DS –Online
285286
```
286287

287-
### Setting the retention range
288+
### Set the retention range
288289

289290
Set the retention for the backup points using the [Set-DPMPolicyObjective](/powershell/module/dataprotectionmanager/set-dpmpolicyobjective) cmdlet. While it might seem odd to set the retention before the backup schedule has been defined, using the ```Set-DPMPolicyObjective``` cmdlet automatically sets a default backup schedule that can then be modified. It's always possible to set the backup schedule first and the retention policy after.
290291

@@ -329,19 +330,19 @@ So if you need to modify the weekly schedule, you need to refer to the ```$onlin
329330

330331
### Initial backup
331332

332-
When backing up a datasource for the first time, DPM needs creates initial replica that creates a full copy of the datasource to be protected on DPM replica volume. This activity can either be scheduled for a specific time, or can be triggered manually, using the [Set-DPMReplicaCreationMethod](/powershell/module/dataprotectionmanager/set-dpmreplicacreationmethod) cmdlet with the parameter ```-NOW```.
333+
When you back up a datasource for the first time, DPM needs creates initial replica that creates a full copy of the datasource to be protected on DPM replica volume. This activity can either be scheduled for a specific time, or can be triggered manually, using the [Set-DPMReplicaCreationMethod](/powershell/module/dataprotectionmanager/set-dpmreplicacreationmethod) cmdlet with the parameter ```-NOW```.
333334

334335
```powershell
335336
Set-DPMReplicaCreationMethod -ProtectionGroup $MPG -NOW
336337
```
337338

338-
### Changing the size of DPM Replica & recovery point volume
339+
### Change the size of DPM Replica & recovery point volume
339340

340341
You can also change the size of DPM Replica volume and Shadow Copy volume using [Set-DPMDatasourceDiskAllocation](/powershell/module/dataprotectionmanager/set-dpmdatasourcediskallocation) cmdlet as in the following example:
341342
Get-DatasourceDiskAllocation -Datasource $DS
342343
Set-DatasourceDiskAllocation -Datasource $DS -ProtectionGroup $MPG -manual -ReplicaArea (2gb) -ShadowCopyArea (2gb)
343344

344-
### Committing the changes to the Protection Group
345+
### Commit the changes to the Protection Group
345346

346347
Finally, the changes need to be committed before DPM can take the backup per the new Protection Group configuration. This can be achieved using the [Set-DPMProtectionGroup](/powershell/module/dataprotectionmanager/set-dpmprotectiongroup) cmdlet.
347348

0 commit comments

Comments
 (0)