本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。
使用 PowerShell Cmdlet 備份叢集
貢獻者
-
此文件 PDF 的網站
![](https://docs.netapp.com/common/images/pdf-zip.png)
個別的 PDF 文件集合
Creating your file...
This may take a few minutes. Thanks for your patience.
Your file is ready
備份叢集包括建立與 SnapCenter 伺服器的連線、新增資源、新增原則、建立備份資源群組及備份。
開始之前
-
您必須準備好PowerShell環境、才能執行PowerShell Cmdlet。
-
您必須新增儲存系統連線並建立認證。
步驟
-
使用Open-SmConnection Cmdlet為SnapCenter 指定的使用者啟動與SetsServer的連線工作階段。
PS C:\> Open-SmConnection
隨即顯示使用者名稱和密碼提示。
-
使用 Add-SmResources Cmdlet 新增手動資源。
此範例說明如何新增 PostgreSQL 執行個體:
PS C:\> Add-SmResource -HostName 10.32.212.13 -PluginCode PostgreSQL -ResourceType Instance -ResourceName postgresqlinst1 -StorageFootPrint (@{"VolumeName"="winpostgresql01_data01";"LUNName"="winpostgresql01_data01";"StorageSystem"="scsnfssvm"}) -MountPoints "D:\"
-
使用Add-SmPolicy Cmdlet建立備份原則。
-
使用SnapCenter Add-SmResourceDGroup Cmdlet保護資源或新增資源群組至Siches。
-
使用New-SmBackup Cmdlet來初始化新的備份工作。
本範例說明如何備份資源群組:
C:\PS> New-SMBackup -ResourceGroupName 'ResourceGroup_wback-up-clusters-using-powershell-cmdlets-postgresql.adocith_Resources' -Policy postgresql_policy1
此範例備份受保護的資源:
C:\PS> New-SMBackup -Resources @{"Host"="10.232.204.42";"Uid"="MDC\SID";"PluginName"="postgresql"} -Policy postgresql_policy2
-
使用Get-smJobSummary Report Cmdlet監控工作狀態(執行中、完成或失敗)。
PS C:\> Get-smJobSummaryReport -JobID 123
-
使用Get-SmBackup Report Cmdlet監控備份工作詳細資料、例如備份ID、備份名稱、以執行還原或複製作業。
PS C:\> Get-SmBackupReport -JobId 351 Output: BackedUpObjects : {DB1} FailedObjects : {} IsScheduled : False HasMetadata : False SmBackupId : 269 SmJobId : 2361 StartDateTime : 10/4/2016 11:20:45 PM EndDateTime : 10/4/2016 11:21:32 PM Duration : 00:00:46.2536470 CreatedDateTime : 10/4/2016 11:21:09 PM Status : Completed ProtectionGroupName : Verify_ASUP_Message_windows SmProtectionGroupId : 211 PolicyName : test2 SmPolicyId : 20 BackupName : Verify_ASUP_Message_windows_scc54_10-04-2016_23.20.46.2758 VerificationStatus : NotVerified VerificationStatuses : SmJobError : BackupType : SCC_BACKUP CatalogingStatus : NotApplicable CatalogingStatuses : ReportDataCreatedDateTime :
您可以執行_Get-Help命令name_來取得可搭配Cmdlet使用之參數及其說明的相關資訊。或者、您也可以參閱 "《軟件指令程式參考指南》SnapCenter"。