Restoring resources using PowerShell cmdlets

Restoring an Exchange database includes initiating a connection session with the SnapCenter Server, listing the backups and retrieving backup information, and restoring a backup.

Before you begin

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

About this task

For information about PowerShell cmdlets, use the SnapCenter cmdlet help or see the cmdlet reference information.

SnapCenter Software 4.0 Windows Cmdlet Reference Guide

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/
    
  2. Retrieve the information about the one or more backups that you want to restore by using the Get-SmBackup cmdlet.
    Example

    This example displays information about all available backups:

    PS C:\> Get-SmBackup
    
    BackupId                      BackupName                    BackupTime                    BackupType
    --------                      ----------                    ----------                    ----------
    341                           ResourceGroup_36304978_UTM... 12/8/2017 4:13:24 PM          Full Backup
    342                           ResourceGroup_36304978_UTM... 12/8/2017 4:16:23 PM          Full Backup
    355                           ResourceGroup_06140588_UTM... 12/8/2017 6:32:36 PM          Log Backup
    356                           ResourceGroup_06140588_UTM... 12/8/2017 6:36:20 PM          Full Backup
    
    
  3. Restore data from the backup by using the Restore-SmBackup cmdlet.
    Example

    This example restores an up-to-the-minute backup:

    C:\PS> Restore-SmBackup -PluginCode SCE -AppObjectId 'sce-w2k12-exch.sceqa.com\sce-w2k12-exch_DB_2' -BackupId 341
    
    Example

    This example restores a point-in-time backup:

    C:\ PS> Restore-SmBackup -PluginCode SCE -AppObjectId 'sce-w2k12-exch.sceqa.com\sce-w2k12-exch_DB_2' -BackupId 341 -LogRestoreType ByTransactionLogs -LogCount 2