Skip to main content
SnapCenter Software 6.0

Clone from a backup

Contributors netapp-soumikd netapp-nsriram

You can use SnapCenter to clone a backup. You can clone from primary or secondary backup. The capabilities of the clone operations depends upon the plug-in that you use.

Before you begin
  • You must have backed up the resources or resource group.

  • The default clone operation only clones storage objects. Clone operations at the application level can only be performed if the NetApp supported plug-in provides that capability.

  • You should ensure that the aggregates hosting the volumes should be in the assigned aggregates list of the storage virtual machine (SVM).

About this task

For ONTAP 9.12.1 and below version, the clones created from the SnapLock Vault Snapshots as part of restore will inherit the SnapLock Vault expiry time. Storage admin should manually cleanup the clones post the SnapLock expiry time.

SnapCenter UI
Steps
  1. In the left navigation pane, click Resources, and then select the appropriate plug-in from the list.

  2. In the Resources page, filter resources from the View drop-down list based on resource type.

    The resources are displayed along with information such as type, host or cluster name, associated resource groups and policies, and status.

  3. Select the resource or resource group.

    You must select a resource if you select a resource group.

    The resource or resource group topology page is displayed.

  4. From the Manage Copies view, select Backups either from the primary or secondary (mirrored or vaulted) storage systems.

  5. Select the data backup from the table, and then click clone icon.

  6. In the Locations page, perform the following:

    For this field…​ Do this…​

    Clone server

    By default, the source host is populated.

    If you want to specify a different host, select the host on which the clone should be mounted and the plug-in is installed.

    Clone suffix

    This is mandatory when the clone destination is the same as the source.

    Enter a suffix that will be appended to the newly cloned resource name. The suffix ensures that the cloned resource is unique on the host.

    For example, rs1_clone. If you are cloning to the same host as the original resource, you must provide a suffix to differentiate the cloned resource from the original resource; otherwise, the operation fails.

    If the resource selected is a LUN and if you are cloning from a secondary backup, then the destination volumes are listed. Single source can have multiple destination volumes.

  7. In the Settings page, perform the following:

    For this field…​ Do this…​

    Initiator name

    Enter the host initiator name, which is either a IQDN or WWPN.

    Igroup protocol

    Select Igroup protocol.

    Note Settings page is displayed only if the storage type is LUN.
  8. In the Scripts page, enter the commands for pre clone or post clone that should be run before or after the clone operation, respectively. Enter the mount command to mount a file system to a host.

    For example:

    • Pre clone command: delete existing databases with the same name

    • Post clone command: verify a database or start a database.

      Mount command for a volume or qtree on a Linux machine: mount<VSERVER_NAME>:%<VOLUME_NAME_Clone /mnt>

  9. In the Notification page, from the Email preference drop-down list, select the scenarios in which you want to send the emails.

    You must also specify the sender and receiver email addresses, and the subject of the email.

  10. Review the summary and click Finish.

  11. Monitor the operation progress by clicking Monitor > Jobs.

PowerShell cmdlets
Steps
  1. Initiate a connection session with the SnapCenter Server for a specified user by using the Open-SmConnection cmdlet.

    Open-SmConnection  -SMSbaseurl  https:\\snapctr.demo.netapp.com:8146/
  2. List the backups that can be cloned using the Get-SmBackup or Get-SmResourceGroup cmdlet.

    This example displays information about all available backups:

     C:\PS>PS C:\> Get-SmBackup
    
    BackupId                      BackupName                    BackupTime                    BackupType
    --------                      ----------                    ----------                    ----------
       1              Payroll Dataset_vise-f6_08... 8/4/2015    11:02:32 AM                   Full Backup
       2              Payroll Dataset_vise-f6_08... 8/4/2015    11:23:17 AM

    This example displays information about a specified resource group:

    PS C:\> Get-SmResourceGroup
    
        Description                 :
        CreationTime                : 10/10/2016 4:45:53 PM
        ModificationTime            : 10/10/2016 4:45:53 PM
        EnableEmail                 : False
        EmailSMTPServer             :
        EmailFrom                   :
        EmailTo                     :
        EmailSubject                :
        EnableSysLog                : False
        ProtectionGroupType         : Backup
        EnableAsupOnFailure         : False
        Policies                    : {}
        HostResourceMaping          : {}
        Configuration               : SMCoreContracts.SmCloneConfiguration
        LastBackupStatus            : Completed
        VerificationServer          :
        EmailBody                   :
        EmailNotificationPreference : Never
        VerificationServerInfo      :
        SchedulerSQLInstance        :
        CustomText                  :
        CustomSnapshotFormat        :
        SearchResources             : False
        ByPassCredential            : False
        IsCustomSnapshot            :
        MaintenanceStatus           : Production
        PluginProtectionGroupTypes  : {SMSQL}
        Tag                         :
        IsInternal                  : False
        EnableEmailAttachment       : False
        VerificationSettings        : {}
        Name                        : NFS_DB
        Type                        : Group
        Id                          : 2
        Host                        :
        UserName                    :
        Passphrase                  :
        Deleted                     : False
        Auth                        : SMCoreContracts.SmAuth
        IsClone                     : False
        CloneLevel                  : 0
        Hosts                       :
        StorageName                 :
        ResourceGroupNames          :
        PolicyNames                 :
    
        Description                 :
        CreationTime                : 10/10/2016 4:51:36 PM
        ModificationTime            : 10/10/2016 5:27:57 PM
        EnableEmail                 : False
        EmailSMTPServer             :
        EmailFrom                   :
        EmailTo                     :
        EmailSubject                :
        EnableSysLog                : False
        ProtectionGroupType         : Backup
        EnableAsupOnFailure         : False
        Policies                    : {}
        HostResourceMaping          : {}
        Configuration               : SMCoreContracts.SmCloneConfiguration
        LastBackupStatus            : Failed
        VerificationServer          :
        EmailBody                   :
        EmailNotificationPreference : Never
        VerificationServerInfo      :
        SchedulerSQLInstance        :
        CustomText                  :
        CustomSnapshotFormat        :
        SearchResources             : False
        ByPassRunAs                 : False
        IsCustomSnapshot            :
        MaintenanceStatus           : Production
        PluginProtectionGroupTypes  : {SMSQL}
        Tag                         :
        IsInternal                  : False
        EnableEmailAttachment       : False
        VerificationSettings        : {}
        Name                        : Test
        Type                        : Group
        Id                          : 3
        Host                        :
        UserName                    :
        Passphrase                  :
        Deleted                     : False
        Auth                        : SMCoreContracts.SmAuth
        IsClone                     : False
        CloneLevel                  : 0
        Hosts                       :
        StorageName                 :
        ResourceGroupNames          :
        PolicyNames                 :
  3. Initiate a clone operation from a clone resource group or an existing backup using the New-SmClone cmdlet.

    This example creates a clone from a specified backup with all logs:

    New-SmClone -BackupName Verify_delete_clone_on_qtree_windows_scc54_10-04-2016_19.05.48.0886 -Resources @{"Host"="scc54.sccore.test.com";"Uid"="QTREE1"}  -
    CloneToInstance scc54.sccore.test.com -Suffix '_QtreeCloneWin9'  -AutoAssignMountPoint -AppPluginCode 'DummyPlugin' -initiatorname 'iqn.1991-
    05.com.microsoft:scc54.sccore.test.com' -igroupprotocol 'mixed'
  4. View the status of the clone job by using the Get-SmCloneReport cmdlet.

    This example displays a clone report for the specified job ID:

    PS C:\> Get-SmCloneReport -JobId 186
    
        SmCloneId           : 1
        SmJobId             : 186
        StartDateTime       : 8/3/2015 2:43:02 PM
        EndDateTime         : 8/3/2015 2:44:08 PM
        Duration            : 00:01:06.6760000
        Status              : Completed
        ProtectionGroupName : Draper
        SmProtectionGroupId : 4
        PolicyName          : OnDemand_Clone
        SmPolicyId          : 4
        BackupPolicyName    : OnDemand_Full_Log
        SmBackupPolicyId    : 1
        CloneHostName       : SCSPR0054212005.mycompany.com
        CloneHostId         : 4
        CloneName           : Draper__clone__08-03-2015_14.43.53
        SourceResources     : {Don, Betty, Bobby, Sally}
        ClonedResources     : {Don_DRAPER, Betty_DRAPER, Bobby_DRAPER, Sally_DRAPER}
        SmJobError          :