Back up clusters using PowerShell cmdlets
-
PDF of this doc site
-
Protect Microsoft SQL Server databases
-
Protect SAP HANA databases
-
Protect IBM Db2
-
Protect PostgreSQL
-
![](https://docs.netapp.com/common/images/pdf-zip.png)
Collection of separate PDF docs
Creating your file...
Backing up a cluster includes establishing a connection with the SnapCenter Server, adding resources, adding a policy, creating a backup resource group, and backing up.
-
You must have prepared the PowerShell environment to execute the PowerShell cmdlets.
-
You must have added the storage system connection and created a credential.
-
Initiate a connection session with the SnapCenter Server for a specified user by using the Open-SmConnection cmdlet.
PS C:\> Open-SmConnection
The username and password prompt is displayed.
-
Add manual resources by using the Add-SmResources cmdlet.
This example shows how to add a PostgreSQL instance:
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:\"
-
Create a backup policy by using the Add-SmPolicy cmdlet.
-
Protect the resource or add a new resource group to SnapCenter by using the Add-SmResourceGroup cmdlet.
-
Initiate a new backup job by using the New-SmBackup cmdlet.
This example shows how to backup a resource group:
C:\PS> New-SMBackup -ResourceGroupName 'ResourceGroup_wback-up-clusters-using-powershell-cmdlets-postgresql.adocith_Resources' -Policy postgresql_policy1
This example backs up a protected resource:
C:\PS> New-SMBackup -Resources @{"Host"="10.232.204.42";"Uid"="MDC\SID";"PluginName"="postgresql"} -Policy postgresql_policy2
-
Monitor the job status (running, completed, or failed) by using the Get-smJobSummaryReport cmdlet.
PS C:\> Get-smJobSummaryReport -JobID 123
-
Monitor the backup job details like backup ID, backup name to perform restore or clone operation by using the Get-SmBackupReport cmdlet.
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 :
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.