Backing up resources using PowerShell cmdlets

Backing up a resource includes establishing a connection with the SnapCenter Server, adding resources, adding a policy, creating a backup resource group, and backing up.

Before you begin

About this task

The information regarding the parameters that can be used with the cmdlet and their descriptions can be obtained by runningGet-Help command_name. Alternatively, you can also refer to the Cmdlet Reference Guide.

SnapCenter Software 4.2 Windows Cmdlet Reference Guide


  1. Initiate a connection session with the SnapCenter Server for a specified user by using the Open-SmConnection cmdlet.
    Open-smconnection  -SMSbaseurl  https:\\\
    The username and password prompt is displayed.
  2. Add resources by using the Add-SmResources cmdlet.
    This example adds resources:
    Add-SmResource -HostName '' -PluginCode 'DB2' -ResourceName NONREC1 -ResourceType Database -StorageFootPrint ( @
    {"VolumeName"="DB2_NONREC1DB";"LunName"="DB2_NONREC1DB";"Vserver"="vserver_scauto_secondary"}) -Instance db2inst1
  3. Create a backup policy by using the Add-SmPolicy cmdlet.

    This example creates a new backup policy:

    Add-SMPolicy -PolicyName 'db2VolumePolicy' -PolicyType 'Backup' -PluginPolicyType DB2  -description 'VolumePolicy'
  4. Add a new resource group to SnapCenter by using the Add-SmResourceGroup cmdlet.

    This example creates a new resource group with the specified policy and resources:

    Add-SmResourceGroup -ResourceGroupName 'Verify_ManualBackup_DatabaseLevel_MultipleVolume_unix' -Resources @(@
    {"Host"="";"Uid"="db2inst2\NONREC"},@{"Host"="";"Uid"="db2inst1\NONREC"}) -Policies db2ManualPolicy
  5. Initiate a new Snapshot copy job by using the New-SmBackup cmdlet.
    New-SMBackup -DatasetName Verify_ManualBackup_DatabaseLevel_MultipleVolume_unix -Policy db2ManualPolicy
  6. View the status of the backup job by using the Get-SmBackupReport cmdlet.

    This example displays a job summary report of all jobs that were run on the specified date:

    PS C:\> Get-SmBackupReport -JobId 351
    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 :