Backing up resources using PowerShell cmdlets

Backing up an Exchange Server database includes establishing a connection with the SnapCenter Server, discovering the Exchange Server database, adding a policy, creating a backup resource group, backing up, and viewing the backup status.

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

Note: Plug-in for Exchange does not support clone operations; therefore, the CloneType parameter for the Add-SmPolicy cmdlet is not supported for Plug-in for Exchange

Steps

  1. Initiate a connection session with the SnapCenter Server for a specified user by using the Open-SmConnection cmdlet.
    Example
    Open-smconnection  -SMSbaseurl  https:\\snapctr.demo.netapp.com:8146/
    The username and password prompt is displayed.
  2. Create a backup policy by using the Add-SmPolicy cmdlet.
    Example

    This example creates a new backup policy with a full backup and log backup Exchange backup type:

    C:\PS> Add-SmPolicy -PolicyName SCE_w2k12_Full_Log_bkp_Policy -PolicyType Backup -PluginPolicytype SCE -SceBackupType FullBackupAndLogBackup -BackupActiveCopies
    Example

    This example creates a new backup policy with an hourly full backup and log backup Exchange backup type:

    C:\PS> Add-SmPolicy -PolicyName SCE_w2k12_Hourly_Full_Log_bkp_Policy -PolicyType Backup -PluginPolicytype SCE -SceBackupType FullBackupAndLogBackup -BackupActiveCopies -ScheduleType Hourly -RetentionSettings @{'BackupType'='DATA';'ScheduleType'='Hourly';'RetentionCount'='10'}
    Example

    This example creates a new backup policy to back up only Exchange logs:

    Add-SmPolicy -PolicyName SCE_w2k12_Log_bkp_Policy -PolicyType Backup -PluginPolicytype SCE -SceBackupType LogBackup -BackupActiveCopies
  3. Discover host resources by using the Get-SmResources cmdlet.
    Example

    This example discovers the resources for the Microsoft Exchange Server plug-in on the specified host:

    C:\PS> Get-SmResources -HostName vise-f6.sddev.mycompany.com -PluginCode SCE
  4. Add a new resource group to SnapCenter by using the Add-SmResourceGroup cmdlet.
    Example

    This example creates a new Exchange Server database backup resource group with the specified policy and resources:

    C:\PS> Add-SmResourceGroup -ResourceGroupName SCE_w2k12_bkp_RG -Description 'Backup ResourceGroup with Full and Log backup policy' -PluginCode SCE -Policies SCE_w2k12_Full_bkp_Policy,SCE_w2k12_Full_Log_bkp_Policy,SCE_w2k12_Log_bkp_Policy -Resources @{'Host'='sce-w2k12-exch';'Type'='Exchange Database';'Names'='sce-w2k12-exch.sceqa.com\sce-w2k12-exch_DB_1,sce-w2k12-exch.sceqa.com\sce-w2k12-exch_DB_2'}
    
    Example

    This example creates a new Exchange Database Availability Group (DAG) backup resource group with the specified policy and resources:

    Add-SmResourceGroup -ResourceGroupName SCE_w2k12_bkp_RG -Description 'Backup ResourceGroup with Full and Log backup policy' -PluginCode SCE -Policies SCE_w2k12_Full_bkp_Policy,SCE_w2k12_Full_Log_bkp_Policy,SCE_w2k12_Log_bkp_Policy -Resources @{"Host"="DAGSCE0102";"Type"="Database Availability Group";"Names"="DAGSCE0102"}
  5. Initiate a new backup job by using the New-SmBackup cmdlet.
    Example
    C:\PS> New-SmBackup -ResourceGroupName SCE_w2k12_bkp_RG -Policy SCE_w2k12_Full_Log_bkp_Policy
    
    Example

    This example creates a new backup to secondary storage:

    New-SMBackup -DatasetName ResourceGroup1 -Policy Secondary_Backup_Policy4
  6. View the status of the backup job by using the Get-SmBackupReport cmdlet.
    Example

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

    C:\PS> Get-SmJobSummaryReport -Date ?1/27/2018?
    
    Example

    This example displays a job summary report for a specific job ID:

    C:\PS> Get-SmJobSummaryReport -JobId 168