Skip to main content
SnapCenter Software 4.7
A newer release of this product is available.

Back up Exchange resources using PowerShell cmdlets

Contributors netapp-soumikd

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.

What you will need

  • You must have prepared the PowerShell environment to execute the PowerShell cmdlets.

  • You must have added the storage system connection and created a credential.

  • You must have added hosts and discovered resources.

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.

    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.

    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

    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'}

    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.

    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.

    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'}

    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.

    C:\PS> New-SmBackup -ResourceGroupName SCE_w2k12_bkp_RG -Policy SCE_w2k12_Full_Log_bkp_Policy

    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.

    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?

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

    C:\PS> Get-SmJobSummaryReport -JobId 168

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, see SnapCenter Software Cmdlet Reference Guide.