Clone from a Windows file system backup
You can use SnapCenter to clone a Windows file system backup. If you want a copy of a single file that was mistakenly deleted or changed, then you can clone a backup and access that file in the clone.
-
You should have prepared for data protection by completing tasks such as adding hosts, identifying resources, and creating storage virtual machine (SVM) connections.
-
You should have a backup of the file system.
-
You should ensure that the aggregates hosting the volumes should be in the assigned aggregates list of the storage virtual machine (SVM).
-
You cannot clone a resource group. You can only clone individual file system backups.
-
If a backup resides on a virtual machine with a VMDK disk, SnapCenter cannot clone the backup to a physical server.
-
If you clone a Windows cluster (for example, a shared LUN or a cluster shared volume (CSV) LUN), the clone is stored as a dedicated LUN on the host that you specify.
-
For a cloning operation, the root directory of the volume mount point cannot be a shared directory.
-
You cannot create a clone on a node that is not the home node for the aggregate.
-
You cannot schedule recurring clone (clone lifecycle) operations for Windows file systems; you can only clone a backup on demand.
-
If you move a LUN that contains a clone to a new volume, SnapCenter can no longer support the clone. For example, you cannot use SnapCenter to delete that clone.
-
You cannot clone across environments. For example, cloning from a physical disk to a virtual disk or vice versa.
-
The SCRIPTS_PATH is defined using the PredefinedWindowsScriptsDirectory key located in the SMCoreServiceHost.exe.Config file of the plug-in host.
If needed, you can change this path and restart SMcore service. It is recommended that you use the default path for security.
The value of the key can be displayed from swagger through the API: API /4.7/configsettings
You can use the GET API to display the value of the key. SET API is not supported.
-
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.
-
In the left navigation pane, click Resources, and then select the appropriate plug-in from the list.
-
In the Resources page, select File Systems from the list.
-
Select the host.
The topology view is automatically displayed if the resource is protected.
-
From the resources list, select the backup that you want to clone, and then click the clone icon.
-
In the Options page, do the following:
For this field… Do this… Clone server
Choose the host on which the clone should be created.
“Auto assign mount point” or “Auto assign volume mount point under path”
Choose whether to automatically assign a mount point or a volume mount point under a path.
Auto assign volume mount point under path: The mount point under a path enables you to provide a specific directory in which the mount points will be created. Before you choose this option, you must verify that the directory is empty. If there is a backup in the directory, the backup will be in an invalid state after the mount operation.
Archive location
Choose an archive location if you are cloning a secondary backup.
-
In the Script page, specify any prescripts or postscripts you want to execute.
The prescripts or postscripts path should not include drives or shares. The path should be relative to the SCRIPTS_PATH. -
Review the summary, and then click Finish.
-
Monitor the operation progress by clicking Monitor > Jobs.
-
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
-
List the backups that can be cloned by 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 Full Backup 11:02:32 AM 2 Payroll Dataset_vise-f6_08... 8/4/2015 11:23:17 AM
This example displays information about a specified resource group, its resources, and associated policies:
PS C:\> Get-SmResourceGroup -ListResources –ListPolicies Description : CreationTime : 8/4/2015 3:44:05 PM ModificationTime : 8/4/2015 3:44:05 PM EnableEmail : False EmailSMTPServer : EmailFrom : EmailTo : EmailSubject : EnableSysLog : False ProtectionGroupType : Backup EnableAsupOnFailure : False Policies : {FinancePolicy} HostResourceMaping : {} Configuration : SMCoreContracts.SmCloneConfiguration LastBackupStatus : VerificationServer : EmailBody : EmailNotificationPreference : Never VerificationServerInfo : SMCoreContracts.SmVerificationServerInfo SchedulerSQLInstance : CustomText : CustomSnapshotFormat : SearchResources : False ByPassCredential : False IsCustomSnapshot : MaintenanceStatus : Production PluginProtectionGroupTypes : {SMSQL} Name : Payrolldataset Type : Group Id : 1 Host : UserName : Passphrase : Deleted : False Auth : SMCoreContracts.SmAuth IsClone : False CloneLevel : 0 ApplySnapvaultUpdate : False ApplyRetention : False RetentionCount : 0 RetentionDays : 0 ApplySnapMirrorUpdate : False SnapVaultLabel : MirrorVaultUpdateRetryCount : 7 AppPolicies : {} Description : FinancePolicy PreScriptPath : PreScriptArguments : PostScriptPath : PostScriptArguments : ScriptTimeOut : 60000 DateModified : 8/4/2015 3:43:30 PM DateCreated : 8/4/2015 3:43:30 PM Schedule : SMCoreContracts.SmSchedule PolicyType : Backup PluginPolicyType : SMSQL Name : FinancePolicy Type : Id : 1 Host : UserName : Passphrase : Deleted : False Auth : SMCoreContracts.SmAuth IsClone : False CloneLevel : 0 clab-a13-13.sddev.lab.netapp.com DatabaseGUID : SQLInstance : clab-a13-13 DbStatus : AutoClosed DbAccess : eUndefined IsSystemDb : False IsSimpleRecoveryMode : False IsSelectable : True SqlDbFileGroups : {} SqlDbLogFiles : {} AppFileStorageGroups : {} LogDirectory : AgName : Version : VolumeGroupIndex : -1 IsSecondary : False Name : TEST Type : SQL Database Id : clab-a13-13\TEST Host : clab-a13-13.sddev.mycompany.com UserName : Passphrase : Deleted : False Auth : SMCoreContracts.SmAuth IsClone : False
-
Initiate a clone operation from an existing backup by using the New-SmClone cmdlet.
This example creates a clone from a specified backup with all logs:
PS C:\> 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 PS C:> New-SmBackup -ResourceGroupName PayrollDataset -Policy FinancePolicy
This example creates a clone to a specified Microsoft SQL Server instance:
PS C:\> 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 -AssignMountPointUnderPath "C:\SCMounts"
-
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}
The information regarding the parameters that can be used with the cmdlet and their descriptions can be obtained by running Get-Help command_name. Alternatively, you can also refer to the SnapCenter Software Cmdlet Reference Guide.