Clonar backups usando cmdlets do PowerShell
O fluxo de trabalho do clone inclui Planejamento, execução da operação do clone e monitoramento da operação.
Você deve ter preparado o ambiente do PowerShell para executar os cmdlets do PowerShell.
Para obter informações sobre cmdlets do PowerShell, use a ajuda do cmdlet SnapCenter ou consulte "Guia de referência de cmdlet do software SnapCenter" .
-
Inicie uma sessão de conexão com o servidor SnapCenter para um usuário especificado usando o cmdlet Open-SmConnection.
Open-SmConnection -SMSbaseurl https:\\snapctr.demo.netapp.com:8146/
-
Liste os backups que podem ser clonados usando o cmdlet Get-SmBackup ou Get-SmResourceGroup.
Este exemplo exibe informações sobre todos os backups disponíveis:
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
Este exemplo exibe informações sobre um grupo de recursos especificado:
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 :
-
Inicie uma operação de clone a partir de um grupo de recursos de clone ou de um backup existente usando o cmdlet New-SmClone.
Este exemplo cria um clone a partir de um backup especificado com todos os 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'
-
Exiba o status da tarefa clone usando o cmdlet Get-SmCloneReport.
Este exemplo exibe um relatório de clone para a ID de tarefa especificada:
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 :