Share via


Copy-DPMDatasourceReplica

Creates a new copy of the replica of the data source.

Syntax

Copy DPMDatasourceReplica

PS
    [-Datasource] <Datasource>
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Note

A new optional parameter [-CheckReplicaFragmentation] is included in DPM 2019 UR1. For more information, see Parameters.

The Copy-DPMDatasourceReplica cmdlet creates a new copy of the DPM datasource on System Center - Data Protection Manager. This cmdlet must be run only when there are high backup latencies for backups due to replica fragmentation. Run the below command to verify the number of extents and identify fragmentation level.

No. of extents = fsutil file queryExtents <replica_filename> | Measure-Object -Line

Compare the number of extents with replica_file_size/refs_cluster_size (refs_cluster_size can be 4K or 64K). If the value for number of extents is close enough to the above value, cmdlet Copy-DPMDatasourceReplica can be used to defrag the replica.

Consider the following while using this cmdlet

Storage

Make sure storage pool has enough free space available to create a new copy of replica. Further, there will be a storage bloat until the older recovery points get pruned.

Datasource Make sure the data source is idle and is not undergoing any operation such as backup, recovery etc. If data source is in any state other than idle. the copy of replica is not allowed.

Fragmentation

Post replica copy is created, ensure the fragmentation is not present by using fsutil command as explained above.

SYNTAX

Example

No. of extents = fsutil file queryExtents <replica_filename> | Measure-Object -Line

Examples

Example 1

PS C:\> $pg = Get-DPMProtectionGroup -DPMServerName "TestingServer"

This command gets the list of all protection groups on the DPM server named TestingServer.

Example 2

PS C:\> $ds = Get-DPMDatasource -ProtectionGroup $pg[<index>]

This command gets the list of all data sources within $pg[<index>].

Example 3

PS C: \>   Copy-DPMDatasourceReplica -Datasource $ds[<index>]

This command creates a copy of the replica for $ds[<index>].

Parameters

-CheckReplicaFragmentation

Calculates the fragmentation percentage for a replica.

Note

This parameter is applicable for DPM 2019 UR1.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Datasource

Specifies a data source object for which this cmdlet removes a replica and creates a new copy of replica.

A data source can be a file system share or volume for the Windows operating system, Microsoft SQL Server database, Microsoft Exchange Server storage group, Microsoft SharePoint farm, Microsoft Virtual Machine, System Center 2019 - Data Protection Manager (DPM) database, or system state that is a member of a protection group. To obtain a datasource object, use the cmdlet Get-DPMDatasource cmdlet.

Parameter properties

Type:Datasource
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.Datasource

Outputs

System.Object