Skip to main content
SnapCenter Software 6.0

Restore Windows file system backups

Contributors netapp-nsriram netapp-soumikd netapp-asubhas

You can use SnapCenter to restore file system backups. File system restoration is a multiphase process that copies all the data from a specified backup to the original location of the file system.

Before you begin
  • You must have backed up the file system.

  • If a scheduled operation, such as a backup operation, is currently in progress for a file system, then that operation must be cancelled before you can start a restore operation.

  • You can only restore a file system backup to the original location, not to an alternate path.

    You cannot restore a single file from a backup because the restored file system overwrites any data on the original location of the file system. To restore a single file from a file system backup, you must clone the backup and access the file in the clone.

  • You cannot restore a system or boot volume.

  • SnapCenter can restore file systems in a Windows cluster without taking the cluster group offline.

About this task
  • The SCRIPTS_PATH is defined using the PredefinedWindowsScriptsDirectory key located in the SMCoreServiceHost.exe.Config file of the plug-in host.

    If needed, you can change this path and restart SMcore service. It is recommended that you use the default path for security.

    The value of the key can be displayed from swagger through the API: API /4.7/configsettings

    You can use the GET API to display the value of the key. SET API is not supported.

  • For SnapMirror active sync restore operation, you must select the backup from the primary location.

  • For ONTAP 9.12.1 and below version, the clones created from the SnapLock Vault Snapshots as part of restore will inherit the SnapLock Vault expiry time. Storage admin should manually cleanup the clones post the SnapLock expiry time.

SnapCenter UI
Steps
  1. In the left navigation pane, click Resources, and then select the appropriate plug-in from the list.

  2. To filter the list of resources, select the File System and Resource Group options.

  3. Select a resource group from the list, and then click Restore.

  4. In the Backups page, select whether you want to restore from primary or secondary storage systems, and then select a backup to restore.

  5. Select your options in the Restore wizard.

  6. You can enter the path and the arguments of the prescript or postscript that you want SnapCenter to run before or after the restore operation, respectively.

    For example, you can run a script to update SNMP traps, automate alerts, send logs, and so on.

    Note The prescripts or postscripts path should not include drives or shares. The path should be relative to the SCRIPTS_PATH.
  7. In the Notification page, select one of the following options:

    For this field…​ Do this…​

    Log SnapCenter server events to storage system syslog

    Select this option to log SnapCenter Server events to the syslog of the storage system.

    Send AutoSupport notification for failed operations to storage system

    Select this option to send information about any failed operations to NetApp using AutoSupport.

    Email preference

    Select Always, On Failure, or On failure or warning to send email messages to recipients after restoring backups. Enter the SMTP server, default email subject line, and To and From email addresses.

  8. Review the summary, and then click Finish.

  9. Monitor the operation progress by clicking Monitor > Jobs.

Important If the restored file system contains a database, then you must also restore the database. If you do not restore the database, then your database might be in an invalid state. For information on restoring databases, see the Data Protection Guide for that database.
PowerShell cmdlets
Steps
  1. Initiate a connection session with the SnapCenter Server for a specified user by using the Open-SmConnection cmdlet.

    PS C:\> Open-Smconnection
  2. Retrieve the information about the one or more backups that you want to restore by using the Get-SmBackup and Get-SmBackupReport cmdlets.

    This example displays information about all available backups:

    PS C:\> Get-SmBackup
    
    BackupId                      BackupName                    BackupTime                    BackupType
    --------                      ----------                    ----------                    ----------
      1               Payroll Dataset_vise-f6_08... 8/4/2015    11:02:32 AM                 Full Backup
      2               Payroll Dataset_vise-f6_08... 8/4/2015    11:23:17 AM

    This example displays detailed information about the backup from January 29th 2015 to February 3rd, 2015:

    PS C:\> Get-SmBackupReport -FromDateTime "1/29/2015" -ToDateTime "2/3/2015"
    
       SmBackupId           : 113
       SmJobId              : 2032
       StartDateTime        : 2/2/2015 6:57:03 AM
       EndDateTime          : 2/2/2015 6:57:11 AM
       Duration             : 00:00:07.3060000
       CreatedDateTime      : 2/2/2015 6:57:23 AM
       Status               : Completed
       ProtectionGroupName  : Clone
       SmProtectionGroupId  : 34
       PolicyName           : Vault
       SmPolicyId           : 18
       BackupName           : Clone_SCSPR0019366001_02-02-2015_06.57.08
       VerificationStatus   : NotVerified
    
       SmBackupId           : 114
       SmJobId              : 2183
       StartDateTime        : 2/2/2015 1:02:41 PM
       EndDateTime          : 2/2/2015 1:02:38 PM
       Duration             : -00:00:03.2300000
       CreatedDateTime      : 2/2/2015 1:02:53 PM
       Status               : Completed
       ProtectionGroupName  : Clone
       SmProtectionGroupId  : 34
       PolicyName           : Vault
       SmPolicyId           : 18
       BackupName           : Clone_SCSPR0019366001_02-02-2015_13.02.45
       VerificationStatus   : NotVerified
  3. Restore data from the backup by using the Restore-SmBackup cmdlet.

    Restore-SmBackup -PluginCode 'DummyPlugin' -AppObjectId 'scc54.sccore.test.com\DummyPlugin\NTP\DB1' -BackupId 269 -Confirm:$false
    output:
    Name                : Restore 'scc54.sccore.test.com\DummyPlugin\NTP\DB1'
    Id                  : 2368
    StartTime           : 10/4/2016 11:22:02 PM
    EndTime             :
    IsCancellable       : False
    IsRestartable       : False
    IsCompleted         : False
    IsVisible           : True
    IsScheduled         : False
    PercentageCompleted : 0
    Description         :
    Status              : Queued
    Owner               :
    Error               :
    Priority            : None
    Tasks               : {}
    ParentJobID         : 0
    EventId             : 0
    JobTypeId           :
    ApisJobKey          :
    ObjectId            : 0
    PluginCode          : NONE
    PluginName          :

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.