Skip to main content
SnapCenter 4.7 cmdlets

Add-SmCloneDataSet

Contributors

Creates a new clone dataset.

Syntax

Add-SmCloneDataSet [-DataSetName]  <String>  [-Description]  <String>  [-PluginCode]  <PluginCode>  [-Policies]  <String>  [-CloneToInstance]  <String>  [-Resources]  <Hashtable[]>  [-Suffix]  <String>  [-SchedulerCredentialName]  <String>  [-ArchivedLocators]  <Hashtable[]>  [-EnableEmail]  <>  [-EmailPreference]  <SmEmailNotificationPreference>  [-CreateRemoteClone]  <Boolean>  [-CustomSnapShotFomat]  <String>  [-CustomText]  <String>

Detailed Description

Creates a new clone resource group and adds resources to it. Additionally, you can attach policies, set notification settings for Event Management System (EMS) logs, AutoSupport, and email notification. You can also specify clone options including clone server and instance, mount options, and attach a suffix to the clone database name. If you are cloning to a SnapMirror or SnapVault destination, specify the secondary location.

Parameters

Name Description Required? Pipeline Input Default Value

DataSetName

Specifies the new clone dataset name.

true

true (ByPropertyName)

Description

Provides an optional description of the resource group you are creating.

false

true (ByPropertyName)

PluginCode

Specifies the plug-in code of the host for which you are creating a clone resource group. Valid values are SCSQL and SCO.

true

true (ByPropertyName)

Policies

Specifies one or more polices you want to attach to the dataset. Multiple policies can be added as a comma-separated list.

false

true (ByPropertyName)

CloneToInstance

Specifies the SQL Server instance that you want to clone to. All databases in the clone resource group are cloned to this instance.

true

true (ByPropertyName)

Resources

Specifies the resources you want to add to the clone resource group.You must provide the resource information in a hashtable, and it must contain the resource name and type, as well as the host on which the resource is located. For example,@{"Host"="localhost";"Type"="SQL Database";"Names"="Instance\Database"}Valid Type values are SQL Database and Oracle Database.You can include comma-separated values for Names.

true

true (ByPropertyName)

Suffix

Provides a clone name suffix. All clones you create with one clone job are appended with the same suffix name.

false

true (ByPropertyName)

SchedulerCredentialName

false

true (ByPropertyName)

ArchivedLocators

Specifies in a hashtable the secondary storage system details for each unique primary storage system resource in the resource group. For example:-ArchivedLocators @{Primary="my_vs1:my_vol_iscsi";Secondary="my_vs1:my_vol_iscsi_SECONDARY"}

false

true (ByPropertyName)

EnableEmail

Specifies whether email notification is enabled. The value is either True or False.

false

false

False

EmailPreference

Specifies when you will receive email notifications.Possible values: Always, Never, OnError, OnErrorOrWarning.

false

false

CreateRemoteClone

Specifies whether or not you are creating a remote clone. The value is either True or False.

false

false

CustomSnapShotFomat

Specifies the custom Snapshot copy naming format. For example, -CustomSnapShotFomat '$CustomText$ResourceGroup$Policy$HostName' -CustomText NetApp

false

true (ByPropertyName)

CustomText

Specifies the custom text in the custom Snapshot copy naming format.

false

true (ByPropertyName)

EmailBody

Specifies the body of the email.

false

true (ByPropertyName)

EmailFrom

Specifies the sender's email address.

true

true (ByPropertyName)

EmailTo

Specifies the recipient's email address.

true

true (ByPropertyName)

EmailSubject

Specifies the subject of the email.

true

true (ByPropertyName)

EnableEmailAttachment

Specifies that you are adding an email attachment.

false

true (ByPropertyName)

Examples

Example 1: Creating a new clone dataset from the primary and adding resources

 Add-SmCloneDataSet -DataSetName payrollclone_dataset -Description "Dataset for payroll database" -Policies clonefromprimary_ondemand -Resources @{"Host"="vise-f3.sddev.mycompany.com";"Type"="SQLDatabases";"Names"="vise-f3\SQLExpress\payroll,vise-f3\SQLExpress\finance"} -Suffix __clone -CloneToInstance vise-f3\sqlexpress -AutoAssignMountPoint

This example syntax creates a new clone dataset from the primary and adds resources.

Description : Dataset for payroll database
CreationTime: 8/5/2015 2:18:38 PM
ModificationTime: 8/5/2015 2:18:38 PM
EnableEmail :
EmailSMTPServer :
EmailFrom   :
EmailTo :
EmailSubject:
EnableSysLog:
ProtectionGroupType : Backup
EnableAsupOnFailure :
Policies: {}
HostResourceMaping  : {}
Configuration   : SMCoreContracts.SmConfiguration
LastBackupStatus:
VerificationServer  :
EmailBody   :
EmailNotificationPreference :
VerificationServerInfo  : SMCoreContracts.SmVerificationServerInfo
SchedulerSQLInstance:
CustomText  :
CustomSnapshotFormat:
SearchResources : False
ByPassRunAs : False
IsCustomSnapshot:
MaintenanceStatus   : Production
PluginProtectionGroupTypes  : {SMSQL}
Name: payrollclone_dataset
Type: Group
Id  : 3
Host:
UserName:
Passphrase  :
Deleted : False
Auth: SMCoreContracts.SmAuth
IsClone : False
CloneLevel  : 0

Example 2: Creating a new clone from a secondary clone

 Add-SmCloneDataSet -DataSetName clone_mdml_ds_mirror -Policies SMcln_full_logbkp_winsched -CloneToInstance "mva-m13-u25
          " -Resources @{"Host"="mva-m13-u25";"Type"="SQL Database";"Names"="mva-m13-u25\TEST"} -ArchivedLocators @{Primary="rajr_vs1:rajr_vol_iscsi";Secondary=
          "rajr_vs1:rajr_vol_iscsi_SECONDARY"} -Suffix "_RAJR"

This example syntax creates a new clone from a secondary clone using the -ArchivedLocators parameter.

Description :
CreationTime: 5/20/2015 11:10:04 AM
ModificationTime: 5/20/2015 11:10:04 AM
EnableEmail : False
EmailSMTPServer :
EmailFrom   :
EmailTo :
EmailSubject:
EnableSysLog: False
ProtectionGroupType : Clone
EnableAsupOnFailure : False
Policies: {SMcln_full_logbkp_winsched}
HostResourceMaping  : {}
Configuration   : SMCoreContracts.SmCloneConfiguration
LastBackupStatus:
VerificationServer  :
EmailBody   :
EmailNotificationPreference : Always
VerificationServerInfo  :
SchedulerSQLInstance:
CustomText  :
CustomSnapshotFormat:
SearchResources : False
ByPassRunAs : False
IsCustomSnapshot: False
MaintenanceStatus   : Production
Name: clone_mdml_ds_mirror
Type: Group
Id  :
Host:
UserName:
Passphrase  :
Deleted : False
Auth: SMCoreContracts.SmAuth
IsClone : False
CloneLevel  : 0