Skip to main content
SnapCenter 6.0 cmdlets

New-SmClone

Contributors

Initiates a clone operation.

Syntax

New-SmClone [-DatasetName]  <String>  [-Policy]  <String>  [-AppPluginCode]  <PluginCode>  [-PDBName]  <String>  [-PDBCloneName]  <String>  [-CDBTargetSID]  <String>  [-PdbsToBeExcluded]  <String>  [-OpenPluggableDatabaseAfterClone]  <Boolean>  [-SkipTempTablespaceTempFileCreation]  <>  [-LogArchivedLocators]  <Hashtable[]>  [-Auth]  <String>  [-IsScheduled]  <Boolean>  [-ClusterName]  <String>  [-SMSBaseUrl]  <String>  [-IsNLBHost]  <Boolean>  [-ScheduleName]  <String>  [-CreateRemoteClone]  <Boolean>  [-Guid1]  <String>  [-Guid2]  <String>  [-BackupName]  <String>  [-Resources]  <Hashtable[]>  [-AppPluginCode]  <PluginCode>  [-CloneUidString]  <String>  [-CloneToInstance]  <String>  [-AutoAssignMountPoint]  <>  [-ArchivedLocators]  <Hashtable[]>  [-AssignMountPointUnderPath]  <String>  [-Suffix]  <String>  [-LogArchivedLocators]  <Hashtable[]>  [-LogRestoreType]  <SmSqlLogRestoreType>  [-LogCutOffDateTime]  <DateTime>  [-LogCount]  <Int32>  [-Auth]  <String>  [-IsScheduled]  <Boolean>  [-ClusterName]  <String>  [-SMSBaseUrl]  <String>  [-IsNLBHost]  <Boolean>  [-ScheduleName]  <String>  [-CloneLastBackup]  <Int32>  [-CreateRemoteClone]  <Boolean>  [-Guid1]  <String>  [-Guid2]  <String>  [-CloneName]  <String>  [-EnableEmail]  <>  [-PreScriptCommand]  <String>  [-PreScriptArguments]  <String>  [-PostScriptCommand]  <String>  [-PostScriptArguments]  <String>  [-ScriptTimeOut]  <Int32>  [-PreCloneScriptPath]  <String>  [-PostCloneScriptPath]  <String>  [-MountCommands]  <String>

Detailed Description

Initiates a clone operation. You can initiate a clone job from either a clone dataset or an existing backup.

Parameters

Name Description Required? Pipeline Input Default Value

DatasetName

Specifies the name of the clone dataset.

true

false

Policy

Specifies the clone policy you want to use.

true

false

AppPluginCode

Specifies the application plug-in type of the resource. Possible values are SMSQL and SCO.

true

false

PDBName

Source Oracle pluggable database name.

false

false

PDBCloneName

Pluggable Clone Oracle pluggable database name.

false

false

CDBTargetSID

Target container database SID.

false

false

PdbsToBeExcluded

List of Oracle pluggable databases to be excluded from newly cloned container database.

false

false

OpenPluggableDatabaseAfterClone

To open pluggable database after clone creation.

false

false

SkipTempTablespaceTempFileCreation

Skips creating a tempfile for the default temporary tablespace of the cloned database.

false

true (ByPropertyName)

LogArchivedLocators

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

false

false

Auth

This parameter is for internal use only.

false

false

IsScheduled

This parameter is for internal use only.

false

false

ClusterName

This parameter is for internal use only.

false

false

SMSBaseUrl

This parameter is for internal use only.

false

false

IsNLBHost

false

false

ScheduleName

false

false

CreateRemoteClone

false

true (ByPropertyName)

Guid1

false

false

Guid2

false

false

OracleUntilCancel

Specifies recovery will be performed using the latest available log backup. If archive log pruning is configured, the latest log backup having archive logs prior to pruning is selected for recovery.

false

true (ByPropertyName)

OracleUntilScn

Specifies the SCN of logs till which you want to recover the cloned Oracle Database.

false

true (ByPropertyName)

OracleUntilTime

Specifies the date and time till which you want to recover the cloned Oracle Database. You must specify the date and time in the 'MM-dd-yyyy HH:mm:ss' format. For example: '07/02/2018 06:12:15'.

false

true (ByPropertyName)

ExternalArchiveLogMountPaths

Specifies the alternate paths for archive logs to be used for recovery. Multiple alternate archive log paths can be specified in a comma separated list.

false

true (ByPropertyName)

DataFilesMountPaths

Specifies, in a hash table, the destination mount path, source directory path, and disk location type.For example: @{"DestinationMountPath" ="/mnt/db12c_data_STAND";"SourceDirectoryPath"=<br>"/mnt/db12c_data";"DiskLocationType"="MountPoint"}

false

true (ByPropertyName)

DatabaseSID

Specifies the Oracle system ID, which is used to uniquely identify a particular database. The maximum length of a clone SID is 8 characters.Example: -DatabaseSID STAND

true

true (ByPropertyName)

DisableArchiveLogMode

Specify if archive log mode to be disabled.

false

true (ByPropertyName)

EnableOSAuthentication

false

true (ByPropertyName)

OracleOsUserName

Specifies the OS user name. For example: -OracleOsUserName oracle

true

true (ByPropertyName)

OracleOsUserGroup

Specifies the name of the Oracle OS user group. For example: oinstall

true

true (ByPropertyName)

databaseLoginUserName

Specifies the login name of the database user.

false

true (ByPropertyName)

databaseLoginPassword

Specifies the database user's login password.

false

true (ByPropertyName)

OracleVersion

Specifies the Oracle version.Example: -OracleVersion 12.1.0.2

false

true (ByPropertyName)

OracleHome

Specifies the Oracle home directory.Example: -OracleHome /ora01/app/oracle/product/11.2.0/db_1

false

true (ByPropertyName)

ControlFileConfiguration

Specifies the path for the control file in a hash table.For example: -ControlFileConfiguration @{"FilePath"="/mnt/db12c_data_STAND/STAND/control/control01.ctl"}, @{"FilePath"="/mnt/db12c_data_STAND/STAND/control/control02.ctl"}

true

true (ByPropertyName)

RedoLogFileConfiguration

Specifies the redo log file details in a hash table. The following parameters are required: FilePath, RedologNumber, TotalSize, BlockSize.The following is an example of using the RedoLogFileConfiguration parameter:-RedoLogFileConfiguration@{"FilePath"="/mnt/db12c_data_STAND/STAND/redolog/redo01.log";"RedologNumber"="1";"BlockSize"="512";"TotalSize"="50"}, @{"FilePath"="/mnt/db12c_data_STAND/STAND/redolog/redo02.log";"RedologNumber"="2";"BlockSize"="512";"TotalSize"="50"}, @{"FilePath" ="/mnt/db12c_data_STAND/STAND/redolog/redo03.log";"RedologNumber"="3";"BlockSize"="512";"TotalSize"="50"}

true

true (ByPropertyName)

PostCloneSqlQueries

Specifies any post-clone SQL queries. Multiple queries are separated by a semicolon ';'.

false

true (ByPropertyName)

CustomParameters

Specifies custom parameters in a hash table. At least one custom parameter is required.For example:-CustomParameters @{"Key" = "audit_file_dest";"Value"="/u01/app/oracle/admin/DB12C/adump_STAND"}, @{"Key"="log_archive_dest_1";"Value"="LOCATION=/u01/app/oracle/product/12.1.0.2/db_1/STAND"}You can use this parameter when you have a clone of a clone that fails with the error "ORA-00058: DB_BLOCK_SIZE must be 32768 to mount this database (not 8192)" to explicitly pass the custom parameter, for example:-CustomParameters @{"Key" = "DB_BLOCK_SIZE ";"Value"="value"} and substituting the correct block size.

false

true (ByPropertyName)

RenamePDBConfiguration

Renames the PDB configuration in a hash table using the following format:-RenamePDBConfiguration @{"CurrentName"="", "NewName"=""}

false

true (ByPropertyName)

SkipRecovery

Indicates that you want to skip the recovery operation of the cloned database.

false

false

DatabasePort

false

true (ByPropertyName)

ASMPort

false

true (ByPropertyName)

DatabaseCredentialName

false

true (ByPropertyName)

AsmCredentialName

false

true (ByPropertyName)

SkipNIDCreation

To skip new DBID creation for the cloned Oracle Database.

false

true (ByPropertyName)

EmailBody

false

true (ByPropertyName)

EmailFrom

Specifies the sender's e-mail address.

true

true (ByPropertyName)

EmailTo

Specifies the receipient's e-mail address.

true

true (ByPropertyName)

EmailSubject

Specifies the subject of the e-mail.

true

true (ByPropertyName)

EnableEmailAttachment

false

true (ByPropertyName)

BackupName

Specifies the name of the backup from which you want to clone.The following is an example of a SnapCenter Plug-in for Oracle Database backup name:-BackupName CDBPS_scomaddev_04-07-2016_06.14.38.8575_0

false

false

Resources

Specifies the list of resources from which to clone. Use the Resources parameter when you are creating a clone from an existing backup.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 value are SQL Database, Oracle Database, Windows Filesystem. For Oracle Database, the format is -Resources @{"Host"="host.example.com";"Oracle Database"="db"}. For Oracle Application Volume, the format is -Resources @{"Host"="host.example.com";"Application Volume"="appVol"}.

true

false

CloneToInstance

Specifies the SQL Server instance that you want to clone to. All databases in the clone dataset are cloned to this instance. For Oracle application volume resource, it specifies the host on which clone should be mounted.

true

true (ByPropertyName)

AutoAssignMountPoint

Specifies that the file system mount point is assigned automatically.

false

true (ByPropertyName)

ArchivedLocators

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

false

true (ByPropertyName)

AssignMountPointUnderPath

Specifies that the file system mount point is created automatically under the specified mount path.

false

true (ByPropertyName)

CloneUid

Provide a target HANA clone UID. Use this parameter if you are creating a HANA clone on the same host as that of the source. You can use the -CloneUid parameter only with a HANA resource.

true

true (ByPropertyName)

CloneInstance

Provide a target DB2 clone instance name. Use this parameter if you are creating a DB2 clone on the different host as that of the source. You can use the -CloneInstance parameter only with a DB2 resource.

true

true (ByPropertyName)

Suffix

Provides a clone name suffix. All clones you create with one clone job are appended with the same suffix name. Use this parameter if you are creating a clone from an existing backup. You can use the -suffix parameter or the -clonename parameter, but not both.

false

true (ByPropertyName)

LogRestoreType

Specifies the recovery type for clones. Valid values are, the roll forward time, the number of logs to roll forward, or that you want to roll all logs forward.

false

true (ByPropertyName)

LogCutOffDateTime

When you specify the date and time in the LogRestoreType parameter, you can use LogCutOffDateTime parameter to indicate the cut off time. If the server and plug-in host are in different time zones, the input must be as per the plug-in host time zone.

false

true (ByPropertyName)

LogCount

When you specify a number of logs in LogRestoreType, use LogCount to specify the number of logs you want to roll forward.

false

true (ByPropertyName)

CloneLastBackup

false

false

CloneName

Enables you to specify a new name for the cloned database or resource. You can use the -clonename parameter or the -suffix parameter, but not both.

false

true (ByPropertyName)

EnableEmail

Specifies whether to enable or disable e-mail.

false

false

PreScriptCommand

Specifies commands that are executed before the restore operation.

false

true (ByPropertyName)

PreScriptArguments

Specifies arguments to the prescript command.

false

true (ByPropertyName)

PostScriptCommand

Specifies the commands that are executed after the restore operation.

false

true (ByPropertyName)

PostScriptArguments

Specifies the arguments to the postscript command.

false

true (ByPropertyName)

PreCloneScriptPath

This is an Oracle Application Volume specific parameter. It specifies absolute path of the executable script to be run before Clone operation. The script should be located either at /var/opt/snapcenter/spl/scripts/ or any directory inside the path on the Oracle Plug-in host.

false

true (ByPropertyName)

PostCloneScriptPath

This is an Oracle Application Volume specific parameter. It specifies absolute path of the executable script to be run after Clone operation. The script should be located either at /var/opt/snapcenter/spl/scripts/ or any directory inside the path on the Oracle Plug-in host.

false

true (ByPropertyName)

MountCommands

This is an Oracle Application Volume specific parameter. It specifies commands to mount a file system to a the Clone Host. Mount command format is : mount <Source_SVM>:%<SOURCE_VOLUME_NAME>_Clone <mount_directory> To clone from secondary, the secondary volume name will be the SOURCE_VOLUME_NAME. Enter multiple mount commands separated by semi colon (;).

false

true (ByPropertyName)

ScriptTimeOut

Specifies the maximum time to wait for the script to complete before timing out.

false

true (ByPropertyName)

InitiatorName

Specifies the iSCSI IQN or FCP WWPN of the host on which the new clone will be created.

false

true (ByPropertyName)

IgroupProtocol

Specifies the Igroup protocol type (mixed, fcp, or iscsi) to be used for the new clone.

false

true (ByPropertyName)

NFSExportIPs

Specifies the comma separated host name or IP address on which the cloned volumes are exported.

false

true (ByPropertyName)

ThroughputMibps

Specifies the capacity pool throughput in Mibps for Manual QoS Capacity Pool.

false

true (ByPropertyName)

CloneSource

Determines the source volume backup type. Valid values are PRIMARY or SECONDARY or OBJECT_STORAGE

false

true (ByPropertyName)

Examples

Example 1: Creating a clone from a dataset

 New-SmClone -DatasetName payrollclone_dataset -Policy clonefromprimary_ondemand

This example syntax creates a new clone using the 'payrollclone_dataset' dataset and policy 'clonefromprimary_ondemand'.

Result   : SMCoreContracts.SMResult
TotalCount   : 0
DisplayCount : 0
Context  :
Job  : SMCoreContracts.SmJob
Name: Clone life cycle of dataset 'payrollclone_dataset' with policy 'clonefromprimary_ondemand'
Id  : 85
StartTime   : 8/5/2015 2:21:06 PM
EndTime :
IsCancellable   : False
IsRestartable   : False
IsCompleted : False
IsVisible   : False
IsScheduled : False
PercentageCompleted : 0
Description :
Status  : Queued
Owner   :
Error   :
Priority: None
Tasks   : {}
ParentJobID : 0
EventId : 0

Example 2: Creating a clone from backup with all logs

 New-SmClone -BackupName payroll_dataset_vise-f3_08-05-2015_15.28.28.9774 -Resources @{"Host"="vise-f3.sddev.mycompany.com";"Type"="SQL Database";"Names"="vise-f3\SQLExpress\payroll"} -CloneToInstance vise-f3\sqlexpress -AutoAssignMountPoint -Suffix _clonefrombackup -LogRestoreType All -Policy clonefromprimary_ondemand

This example syntax creates a clone from the specified backup with all logs.

Result   : SMCoreContracts.SMResult
TotalCount   : 0
DisplayCount : 0
Context  :
Job  : SMCoreContracts.SmJob
Clones   : {}

Example 3: Creating a clone from backup with the specified number of logs

 New-SmClone -BackupName payroll_dataset_vise-f3_08-05-2015_15.28.28.9774 -Resources @{"
          Host"="vise-f3.sddev.mycompany.com";"Type"="SQL Database";"Names"="vise-f3\SQLExpress\payroll"} -CloneToInstance vise-f
          3\sqlexpress -AutoAssignMountPoint -Suffix _clonefrombackup1 -LogRestoreType ByTransactionLogs -LogCount 2 -Policy clone
          fromprimary_ondemand

This example syntax creates a clone from backup with the specified number of logs.

Result   : SMCoreContracts.SMResult
TotalCount   : 0
DisplayCount : 0
Context  :
Job  : SMCoreContracts.SmJob
Clones   : {}

Example 4: Creating a clone from backup with no logs

 New-SmClone -BackupName payroll_dataset_vise-f3_08-05-2015_15.28.28.9774 -Resources @{
          Host"="vise-f3.sddev.mycompany.com";"Type"="SQL Database";"Names"="vise-f3\SQLExpress\payroll"} -CloneToInstance vise-
          3\sqlexpress -AutoAssignMountPoint -Suffix _clonefrombackup1 -LogRestoreType None -Policy clonefromprimary_ondemand

This example syntax creates a clone from the specified backup with no logs.

Result   : SMCoreContracts.SMResult
TotalCount   : 0
DisplayCount : 0
Context  :
Job  : SMCoreContracts.SmJob
Clones   : {}

Example 5: Creating a clone to Microsoft SQL Server instance

 New-SmClone -BackupName "BackupDS1_NY-VM-SC-SQL_12-08-2015_09.00.24.8367" -Resources @{"host"="ny-vm-sc-sql";"Type"="SQL Database";"Names"="ny-vm-sc-sql\AdventureWorks2012_data"} -AppPluginCode SMSQL -CloneToInstance "ny-vm-sc-sql" -Suffix _CLPOSH -AutoAssignMountPoint -AssignMountPointUnderPath "C:\SCMounts"

This example syntax creates a clone to the specified Microsoft SQL Server instance.

Example 6: Creating an on demand clone of DB2 resource on alternate host from primary storage

 New-SmClone -BackupName Verify_Clone_frombackup_Multiple_vols_with_resources_Alternate_Host_sccorelinux61_08-21-2016_19.04.14.6011 -Resources @(@{"Host"="sccorelinux61.sccore.test.com";"Uid"="db2inst1\TESTDB"}) -CloneToInstance sccore146.sccore.test.com -CloneName 'TESTDB' -CloneInstance 'db2inst1' -AppPluginCode 'DB2'

This example syntax creates a clone of the resource, hosted on Storage type NFS, and creates a new clone on an alternate host, which takes clone instance name and clone database name of target host

Result   : SMCoreContracts.SMResult
TotalCount   : 0
DisplayCount : 0
Context  :
Job  : SMCoreContracts.SmJob
Clones   : {}
Name: Clone from backup 'Verify_Clone_frombackup_Multiple_vols_with_resources_Alternate_Host_sccorelinux61_08-21-2016_19.04.14.6011'
Id  : 61043
StartTime   : 5/21/2024 7:05:11 PM
EndTime :
IsCancellable   : False
IsRestartable   : False
IsCompleted : False
IsVisible   : True
IsScheduled : False
PercentageCompleted : 0
Description :
Status  : Queued
Owner   :
Error   :
Priority: None
Tasks   : {}
ParentJobID : 0
EventId : 0
PluginCode  : NONE
PluginName  :

Example 7: Creating an on demand clone from Secondary Storage for custom plugin resource

 New-SmClone -BackupName Verify_clone_secondary_SM_on_Qtree_unix_sccorelinux61_08-21-2016_16.57.18.8490 -Resources @{"Host"="sccorelinux61.sccore.test.com";"Uid"="QTREESM1"}  -CloneToInstance sccorelinux61.sccore.test.com -Suffix '_QtreeClone4'  -preclonecreatecommands 'mkdir /qtreeVol6_clone' -ArchivedLocators ( @{Primary="vserver_scauto_secondary:qtree_vol6_sccorelinux61_sccore_test_com";Secondary="vserver_scauto_primary:qtree_vol6SM_sccorelinux61_sccore_test_com"}) -AutoAssignMountPoint -AppPluginCode 'DB2' -mountcommand 'mount vserver_scauto_primary:%qtree_vol6_sccorelinux61_sccore_test_com/qtreeVol6_Clone  /qtreeVol6_clone'

Clone QTree to same host from Secondary Storage using mount command.
At run-time, %qtree_vol6_sccorelinux61_sccore_test_com (source volume name) will resolve to new cloned volume name and new clone exported QTree will be mounted on folder "/qtreeVol6_clone

Example 8: Creating a clone of an ASM database

 New-SmClone -BackupName "RG_084825_rhel68_asmsan_03-04-2017_08.49.52.1104_0" -AppPluginCode SCO -DatabaseSID clone -Resources @{"Host"="10.228.9.250";"Oracle Database"="sandb"} -AutoAssignMountPoint -CloneToInstance 10.228.9.250 -ControlFileConfiguration @{"FilePath"="/home/oracle/control01.ctl"} -RedoLogFileConfiguration  @{"FilePath"="/home/oracle/redo03.log";"RedologNumber"="3";"TotalSize"="50";"BlockSize"="512"},@{"FilePath"="/home/oracle/redo02.log";"RedologNumber"="2";"TotalSize"="50";"BlockSize"="512"},@{"FilePath"="/home/oracle/redo01.log";"RedologNumber"="1";"TotalSize"="50";"BlockSize"="512"} -CustomParameters @{"Key" = "audit_file_dest";"Value"="/var/test"}

This example syntax creates a clone of an Automatic Storage Management (ASM) database.

Example 9: Creating a clone using a Windows file system resource

 New-SmClone -CloneLastBackup 0 -Resources @{"Host"="localhost";"Type"="Windows Filesystem";"Names"="F:\"} -AppPluginCode SCW -AssignMountPointUnderPath C:\scmnpt\ -CloneToHost localhost

Example 10: Creating a remote clone

 New-SmClone -BackupName SQL-Prod_mydb_SQL_Prod_10-23-2017_15.56.12.1837 -AppPluginCode SMSQL  -Suffix _clone2 -Resources (@{"Host"="SQL-PROD";"Type"="SQL Database";"Names"="SQL-PRD\mydb"}) -CloneToInstance SQL-PRD  -ArchivedLocators (@{Primary="svm1:sql_data";Secondary="svm1-dr:sql_data_vault"},@{Primary="svm1:sql_log";Secondary="svm1-dr:sql_log_vault"}) -AutoAssignMountPoint
This example syntax creates a clone from secondary storage with the following details:
Primary data volume path: svm1:sql_data
Secondary  data volume path: svm1-dr:sql_data_vault
Primary log volume path: svm1:sql_log
Secondary  log volume path: svm1-dr:sql_log_vault
The "ArchivedLocators" attribute is populated as a hash table with Primary and Secondary values for each volume that hosts the SQL database you want to clone.

Example 11: Creating an on demand clone for HANA database from primary backup and using NFSExportIPs to export the cloned volumes

 New-SmClone -BackupName cn2_sccore_test_com_hana_NonDataVolume_C21_CN_cn2_06-21-2018_03.21.14.6261 -Resources @{"Host"="cn2";"UID"="NonDataVolume\C21\CN"}
          -AppPluginCode HANA -CloneToInstance rhel182 -CloneUid="NonDataVolume\C22" -nfsexportips "RHEL182,10.232.206.116,sccorelinux61.sccore.test.com" -mountcommand "mount 10.232.206.5:%cn_p2_Clone /cn_vol_test"

Clone from primary storage using NFS Export IP field to specify the comma separated host name or IP address on which the cloned volumes are exported

Example 12: Creating a HANA Clone on same centralized host with mount command, NFS Export IPs and QoS

 New-SmClone -BackupName "mva-s63_gdl_englab_com_hana_MDC_H14_mva-s63_03-22-2021_05.43.49.8438" -Resources @{"Host"="schana01.gdl.englab.netapp.com";"Uid"="MDC\R70"}
 -CloneToInstance "mva-s63.gdl.englab.com" -AppPluginCode HANA -CloneUid "MDC\H70"
 -NFSExportIPs "10.232.206.116,mva-s63.gdl.englab.com" -mountcommand "mount 10.232.206.5:%cn_p2_Clone /cn_vol_test"
 -ThroughputMibps 1.56

HANA clone will be created using the same centralized host. In case of the same host, use -CloneUid paramter to specify the target clone UID.

Example 13: Creating an on demand clone for HANA database from secondary backup and using NFSExportIPs to export the cloned volumes

 New-SmClone -BackupName cn2_sccore_test_com_hana_NonDataVolume_C21_CN_cn2_06-21-2018_03.21.14.6261 -Resources @{"Host"="cn2";"UID"="NonDataVolume\C21\CN"}
            -AppPluginCode HANA -CloneToInstance rhel182 -CloneUid="NonDataVolume\C22" -ArchivedLocators @{"primary"="vs_test1:cn_p2";"secondary"="vs_test1:cn_p2_vault1"} -nfsexportips "RHEL182,10.232.206.116,sccorelinux61.sccore.test.com" -mountcommand "mount 10.232.206.5:%cn_p2_Clone /cn_vol_test"

Clone from secondary storage backup using NFS Export IP field to specify the comma separated host name or IP address on which the cloned volumes are exported

Example 14: Creating an Oracle database clone from secondary using LogArchivedLocators

 New-SmClone -OracleOsUserName oracle -OracleOsUserGroup oinstall -BackupName "auto-nfs_gdl_englab_netapp_com_nasdb_05-02-2018_08.39.11.5184_0" -AppPluginCode SCO -DatabaseSID Clon32 -Resources @{"Host"="auto-nfs.gdl.englab.netapp.com";"Oracle Database"="nasdb"} -AutoAssignMountPoint -CloneToInstance auto-nfs.gdl.englab.netapp.com -ControlFileConfiguration @{"FilePath"="/mnt/Data_Clon32/Clon32/control/control01.ctl"} -RedoLogFileConfiguration @{"FilePath"="/mnt/Data_Clon32/Clon32/redolog/redo01.log";"RedologNumber"="3";"TotalSize"="50";"BlockSize"="512"},@{"FilePath"="/MntPt_StaDB/Data_Clon32/Clon32/redolog/redo02.log";"RedologNumber"="2";"TotalSize"="50";"BlockSize"="512"},@{"FilePath"="/MntPt_StaDB/Data_Clon32/Clon32/redolog/redo03.log";"RedologNumber"="1";"TotalSize"="50";"BlockSize"="512"} -CustomParameters @{"Key" = "audit_file_dest";"Value"="/var/test"} -archivedlocators @{Primary="10.225.118.251:auto_nfs_data";Secondary="ongqathree_man:ongqaone_man_auto_nfs_data_vault"} -logarchivedlocators @{Primary="10.225.118.251:auto_nfs_log";Secondary="ongqathree_man:ongqaone_man_auto_nfs_log_vault"}

This example uses the -LogArchivedLocators to create an Oracle database clone from secondary storage.

Example 15: Creating an SQL clone using the clonename parameter to specify a new clone name

 New-SmClone -BackupName SCNEW3_INSTANCE1_SCNEW3_MDML2_SCNEW3_02-28-2018_02.27.53
          .7034 -Resources @{"Host"="SCNEW3";"Type"="SQL Database";"Names"="SCNEW3\INSTANCE1\SCNEW3_MDML2"}  -CloneToInstance SCNE
          W3\INSTANCE1 -clonename '_Clone_035231'  -LogRestoreType 'None' -AutoAssignMountPoint -AppPluginCode 'SCSQL'

This example creates a new clone _Clone_035231 using the -clonename parameter.

Example 16: Creating an ASM Oracle database clone using the backupname parameter

 New-SmClone -OracleOsUserName oracle -OracleOsUserGroup oinstall -BackupName "scodev-us1_gdl_englab_netapp_com_asmud2_scodev-us1_04-13-2020_08.15.50.6683_0" -AppPluginCode SCO -DatabaseSID abc3 -Resources @{"Host"="scodev-us1.gdl.englab.netapp.com";"Oracle Database"="asmud2"} -AutoAssignMountPoint -CloneToInstance scodev-us1.gdl.englab.netapp.com -DataFilesMountPaths @{"DestinationMountPath"="SC_2443056968_abc3";"DiskLocationType"="Asm_DiskGroup";"SourceDirectoryPath"="DATAUDEV2"} -ControlFileConfiguration @{"FilePath"="+SC_2443056968_abc3/abc3/control/control01.ctl"} -RedoLogFileConfiguration @{"FilePath"="+SC_2443056968_abc3/abc3/redolog/redo03.log";"RedologNumber"="3";"TotalSize"="50";"BlockSize"="512"},@{"FilePath"="+SC_2443056968_abc3/abc3/redolog/redo02.log";"RedologNumber"="2";"TotalSize"="50";"BlockSize"="512"},@{"FilePath"="+SC_2443056968_abc3/abc3/redolog/redo01.log";"RedologNumber"="1";"TotalSize"="50";"BlockSize"="512"}  -CustomParameters @{"Key" = "audit_file_dest";"Value"="/ora01/app/oracle_software/oracle_base/admin/abc3/adump"};

This example creates a new ASM Oracle database clone abc3 using the -BackupName parameter.

Example 17: Creating an Oracle PDB clone

 New-SmClone -OracleOsUserName oracle -OracleOsUserGroup oinstall -BackupName "R706261C8F1V1_ZCDB1_R706261C8F1V1_08-03-2020_03.36.23.5540_0" -AppPluginCode SCO -PDBName PDB3 -PDBCloneName SCJOBID -CDBTargetSID ZCDB1 -OpenPluggableDatabaseAfterClone -Resources @{"Host"="scodev-us1.gdl.englab.netapp.com";"Oracle Database"="asmud2"} -AutoAssignMountPoint -CloneToInstance scodev-us1.gdl.englab.netapp.com -DataFilesMountPaths @{"DestinationMountPath"="SC_2443056968_abc3";"DiskLocationType"="Asm_DiskGroup";"SourceDirectoryPath"="DATAUDEV2"} -ControlFileConfiguration @{"FilePath"="+SC_2443056968_abc3/abc3/control/control01.ctl"} -RedoLogFileConfiguration @{"FilePath"="+SC_2443056968_abc3/abc3/redolog/redo03.log";"RedologNumber"="3";"TotalSize"="50";"BlockSize"="512"},@{"FilePath"="+SC_2443056968_abc3/abc3/redolog/redo02.log";"RedologNumber"="2";"TotalSize"="50";"BlockSize"="512"},@{"FilePath"="+SC_2443056968_abc3/abc3/redolog/redo01.log";"RedologNumber"="1";"TotalSize"="50";"BlockSize"="512"}  -CustomParameters @{"Key" = "audit_file_dest";"Value"="/ora01/app/oracle_software/oracle_base/admin/abc3/adump"};

This example creates an Oracle PDB clone.

Example 18: Cloning an Oracle Application Volume from backup

 New-SmClone -AppPluginCode SCO -BackupName "R8092776CF4V1_HNK2_com_appVol1_R8092776CF4V1_11-06-2021_03.04.13.5289" -Resources @{"Host"="R8092776CF4V1.HNK2.com";"Application Volume"="appVol1"} -CloneName testExampleClone -CloneToInstance R8092776CF4V1.HNK2.com -PreCloneScriptPath "/var/opt/snapcenter/spl/scripts/preClone.sh" -MountCommands "mount Test_SVM:%vol_test1_Clone /mnt/test" -PostCloneScriptPath "/var/opt/snapcenter/spl/scripts/postClone.sh"

This example clones an Oracle Application Volume from backup.

Example 19: Cloning an Oracle Application Volume from secondary storage backup

 New-SmClone -AppPluginCode SCO -BackupName "R8092776CF4V1_HNK2_com_appVol1_R8092776CF4V1_11-06-2021_03.04.13.5289" -Resources @{"Host"="R8092776CF4V1.HNK2.com";"Application Volume"="appVol1"} -CloneName testExampleClone -CloneToInstance R8092776CF4V1.HNK2.com -ArchivedLocators @{"primary"="Source_SVM:vol_source";"secondary"="Dest_SVM:vol_source_dest"}

This example clones an Oracle Application Volume from secondary storage backup.

Example 20: Creating a clone from a primary backup for UnixFileSystems plug-in

 New-SmClone -AppPluginCode UnixFileSystems -BackupName "RG_PS_linuxfs201_LVM1_12648_linuxfs201_12-12-2023_05.31.08.1302" -Resources @{"Host"="linuxfs.gdl.englab.netapp.com";"Uid"="/netapp/VGNFS1/LVM1"} -suffix _Suffix_PrimPS_linuxfs201_LVM1_12648 -CloneToHost linuxfs.gdl.englab.netapp.com

This example syntax creates a new clone using the backup and given suffix.

			Result   : SMCoreContracts.SMResult
			TotalCount   : 0
			DisplayCount : 0
			Context  :
			Job  : SMCoreContracts.SmJob
			Clones   : {}
			Name: Clone from backup 'RG_PS_linuxfs201_LVM1_12648_linuxfs201_12-12-2023_05.31.08.1302'
			Id  : 2763
			StartTime   : 12/12/2023 8:32:40 AM
			EndTime :
			IsCancellable   : False
			IsRestartable   : False
			IsCompleted : False
			IsVisible   : True
			IsScheduled : False
			PercentageCompleted : 0
			Description :
			Status  : Queued
			Owner   :
			Error   :
			Priority: None
			Tasks   : {}
			ParentJobID : 0
			EventId : 0
			JobTypeId   : 6
			ApisJobKey  :
			ObjectId: 0
			PluginCode  : SCC
			PluginName  : PluginCreator
			HostId  : 0
			RoleId  :
			JobIds  : {}
			ScsJobId:

Example 21: Creating a clone from a secondary backup for UnixFileSystems plug-in

 New-SmClone -AppPluginCode UnixFileSystems -BackupName "RG_PS_linuxfs201_LVM1_12648_linuxfs201_12-12-2023_05.31.08.1302" -Resources @{"Host"="linuxfs.gdl.englab.netapp.com";"Uid"="/netapp/VGNFS1/LVM1"} -ArchivedLocators @{"primary"="Source_SVM:vol_source";"secondary"="Dest_SVM:vol_source_dest"} -AutoAssignMountPoint -clonename /netapp/VGNFS1/ClnName_Sec_PS_linuxfs_LVM1_12648

This example syntax creates a new clone using the secondary backup and given clonename.

			Result   : SMCoreContracts.SMResult
			TotalCount   : 0
			DisplayCount : 0
			Context  :
			Job  : SMCoreContracts.SmJob
			Clones   : {}
			Name: Clone from backup 'RG_PS_linuxfs_LVM1_12648_linuxfs201_12-12-2023_05.31.08.1302'
			Id  : 2783
			StartTime   : 12/12/2023 8:32:40 AM
			EndTime :
			IsCancellable   : False
			IsRestartable   : False
			IsCompleted : False
			IsVisible   : True
			IsScheduled : False
			PercentageCompleted : 0
			Description :
			Status  : Queued
			Owner   :
			Error   :
			Priority: None
			Tasks   : {}
			ParentJobID : 0
			EventId : 0
			JobTypeId   : 6
			ApisJobKey  :
			ObjectId: 0
			PluginCode  : SCC
			PluginName  : PluginCreator
			HostId  : 0
			RoleId  :
			JobIds  : {}
			ScsJobId: