本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。

使用PowerShell Cmdlet複製備份

貢獻者

複製工作流程包括規劃、執行複製作業及監控作業。

您需要的是什麼

您必須準備好PowerShell環境、才能執行PowerShell Cmdlet。

如需PowerShell Cmdlet的相關資訊、請使用SnapCenter 支援程式指令程式、或參閱 "《軟件指令程式參考指南》SnapCenter"

步驟

  1. 使用Open-SmConnection Cmdlet為SnapCenter 指定的使用者啟動與SetsServer的連線工作階段。

    Open-SmConnection  -SMSbaseurl  https:\\snapctr.demo.netapp.com:8146/
  2. 列出可使用Get-SmBackup或Get-SmResource Group Cmdlet複製的備份。

    此範例顯示所有可用備份的相關資訊:

     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

    此範例顯示指定資源群組的相關資訊:

    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. 使用New-SmClone Cmdlet從複製資源群組或現有備份啟動複製作業。

    此範例使用所有記錄檔、從指定的備份建立複本:

    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. 使用Get-SmCloneReport Cmdlet檢視複製工作的狀態。

    此範例顯示指定工作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          :