Copy-DPMDatasourceReplica
Creates a new copy of the replica of the data source.
Syntax
Copy-DPMDatasourceReplica
[-Datasource] <Datasource>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Copy-DPMDatasourceReplica
-Line
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.
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.
Type: | SwitchParameter |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | 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.
Type: | Datasource |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Microsoft.Internal.EnterpriseStorage.Dls.UI.ObjectModel.OMCommon.Datasource
Outputs
System.Object