The restore-backup command enables you to restore the Storage Group and databases.
Description
restore-backup-Backup <name_of_the_backup>-RestoreLastBackup <restore_last_backup>-VerifyOnDestVolumes <src_storage_system_list:src_vol:dest_storage_system:dest_vol>-Verify <True|False>-VerifyMetadata <True|False>-ExhaustiveVerification <True|False>-Server <server_name>-DestinationServer <dest_server_name>-AutoMount <True|False>-TestRestore <True|False>-storagegroup <storage_grp>-targetstoragegroup <dest_storage_grp>-Database <database1, database2, ...>-RestoreFromUnmanagedMedia <True|False>-Rehomemailbox <True|False>-BkUpServer <backup_server_name>-SnapInfoDirectory <snapinfo_dir_path>-PointInTime <True|False>>-VerDestVolume <True|False>-VerificationServer <verf_server_name>-CCRActiveNode Boolean <True|False>-OverrideVer <True|False>-CheckLog <True|False>-Destination <storage_grp_name>-DestinationServer <dest_server_name>-RecoveryPointTime <recvry_pt_time_stamp>-CancelBackup <True|False>-WaitForBackupComplete <True|False>-RecoveryPoint <True|False>-RestoreArchivedBackup <True|False>-ProxyServer <proxy_server_name>-NoAccessToRemoteBackup <True|False>-ArchiveBackup <True|False>-VerifyArchiveBackup <True|False>common parameters
This command enables you to restore backup sets with all of the options available through the GUI.
This command also supports the following common parameters:
- -Debug (-db)
- -ErrorAction (-ea)
- -ErrorVariable (-ev)
- -OutBuffer (-ob)
- -OutVariable (-ov)
- -Verbose (-vb)
- -Confirm
To learn more about common parameters, see help about_ubiquitous_parameters.
- -Backup <name_of_the_backup>
- Short form: bkup
- The name of the backup set that you want to restore.
- -RestoreLastBackup <restore_last_backup>
- Short form: rstlast
- Restores backup copies without specifying the name.
- If you try to use Backup and RestoreLastBackup together, SnapManager ignores RestoreLastBackup and uses Backup during the restore operation.
- A typical usage example of the RestoreLastBackup parameter is as follows: restore-backup -restorelastbackup = 1 -backup = “backup name”
- If the value of RestoreLastBackup is 1, SnapManager ignores this parameter and uses the Backup during the restore operation.
Note: The default value of this parameter is 0, which means that
SnapManager restores the latest backup. If the value is 1,
SnapManager restores the second-to-latest backup.
- -VerifyOnDestVolumes <src_storage_system_list:src_vol:dest_storage_system:dest_vol>
- Short form: vermirror
- Overrides the existing SnapMirror relationships.
- -Verify <True|False>
- Short name: ver
- Verifies the backed up SnapManager databases and transaction logs. -Verify is a switch parameter.
- -VerifyMetadata <True|False>
- Short form: vermetadata
- Verifies the metadata and transaction logs.
- -ExhaustiveVerification <True|False>
- Short form: exhver
- Performs exhaustive database verification.
- -Server <server_name>
- Short name: svr
- Specifies the target Exchange server name.
- In a cluster configuration, you need to specify -Server explicitly in all of the cmdlets to perform all operations. If -Server is not specified explicitly in a stand-alone server, SnapManager uses the local machine as the default to run the following cmdlets: new-backup, verify-backup, restore-backup, get-backup, and delete-backup.
- -DestinationServer <dest_server_name>
- The name of the target server where the Recovery Storage Group is to be created.
- DestinationServer is specified to restore to a Recovery Storage Group during the restore operation.
- -AutoMount <True|False>
- Short from: mt
- Mounts the databases automatically after the restore operation.
- -TestRestore <True|False>
- Short form: test
- Performs test restore operation.
- The default value for TestRestore is False.
- -StorageGroup <storage_grp1, storage_grp2, ...>
- Short name: sg
- Specifies the list of Storage Groups to be verified during the backup operation.
- If invalid Storage Groups are specified in new-backup during backup operation, PowerShell cancels the new-backup operation. SnapManager displays an appropriate error message and does not selectively backup any valid Storage Groups. Scheduled jobs and backup scripts also fail when there is an invalid Storage Group configuration.
- -Database <database1, database2, ...>
- Short name: dbs
- Lists the databases in the following format:
- -Database "DatabaseName1", "DatabaseName2"
- If you do not specify Database, the cmdlet restores all databases.
- If the cmdlet has a StorageGroup parameter specified, then the cmdlet is restoring a storage group of Exchange Server 2003 or Exchange Server 2007. The Database parameter is then an optional parameter for a list of databases under the specified storage group.
- If the cmdlet does not have a StorageGroup parameter specified, and Database has only one element, then the cmdlet is restoring a database of Exchange Server 2010.
- -targetstoragegroup <dest_storage_grp>
- Short form: tarsg
- Specifies the destination Storage Group.
- -Database <database1, database2, ...>
- Short form: dbs
- Specifies the list of databases separated by commas.
- If you do not specify Database, SnapManager restores all of the databases.
- -RestoreFromUnmanagedMedia <True|False>
- Short form: rstumm
- Restores backup sets that are archived on a server, other than the server they were created on. This is a switch parameter.
Note: You can restore the backup copies created on a different Exchange server to the server on which the restore operation was initiated. Before you can restore databases to server other than your current Exchange server, you must remap the source LUNs to the current Exchange server, using the same drive letter that was assigned to the original Exchange server.
- -Rehomemailbox <True|False>
- Updates the user accounts associated with mailboxes in restored databases to point to the mailbox server with the new name.
- This is an optional parameter with the restore-backup cmdlet of another server, or RestoreFromUnmanagedMedia in Exchange Server 2007. You cannot use it to restore to a Recovery Storage Group.
- -BkUpServer <backup_server_name>
- Short form: bksvr
- Specifies the name of the server on which the backup copy was created. Use this parameter only with RestoreFromUnmanagedMedia and RestoreFromServer where the backup copy was originally created.
- -SnapInfoDirectory <snapinfo_dir_path>
- Short form: sifdir
- Specifies the SnapInfo directory path for the archived backup set during the restore operation. Use this parameter only with RestoreFromUnmanagedMedia parameter and the RestoreFromServer parameters.
- -PointInTime <True|False>>
- Short form: pit
- Performs a point-in-time restore operation.
- -VerDestVolume <True|False>
- Short form: verdest
- Verifies the SnapMirror destination volume.
- -VerificationServer <verf_server_name>
- Short form: versvr
- Overrides the preconfigured SnapManager verification settings. It specifies the host to be used as the verification server for the verification phase of a backup operation.
- -CCRActiveNode Boolean <True|False>
- Short form: ccrnode
- Specifies whether the connection is to an active, or a passive node, respectively. This is a Boolean parameter.
- -OverrideVer <True|False>
- Short form: ovr
- Overrides the verification of the databases.
- -CheckLog <True|False>
- Short from: chklog
- Specifies the transaction logs to be restored.
- -Destination <storage_grp_name>
- Specifies where the backup copy need to be restored.
- You can restore to the same Storage Group or to the Recovery Storage Group. The default value is tosamesg. To restore the backup copy to the Recovery Storage Group, enter torsg.
- -DestinationServer <dest_server_name>
- Short form: dstsvr
- Specifies the name of the destination Exchange server.
- -RecoveryPointTime <recvry_pt_time_stamp>
- Specifies the recovery point timestamp.
- The timestamp for each recovery point can be seen from the output of the get-backup cmdlet. If the specified timestamp does not match any of the recovery points shown in the backup copies, the restore-backup cmdlet returns an error message showing the available recovery points before and after the timestamp.
Note: -
RecoveryPointTime option overrides
PointInTime if you specify both.
- -CancelBackup <True|False>
- Pauses all the active scheduled backup jobs on the current Exchange Server, or on all nodes in the cluster environment, and cancels the current backup copy before performing the restore operation.
- When the restore operation completes, SnapManager enables the paused scheduled backup jobs only . All the other inactive jobs do not change.
- -WaitForBackupComplete <True|False>
- Pauses all the active scheduled backup jobs on the current Exchange Server, or on all nodes in the cluster environment, and waits for the current backup operation to complete before performing the restore operation. When the restore operation completes, SnapManager enables only the paused scheduled backup jobs. All the other inactive jobs do not change.
- -RecoveryPoint <True|False>
- Specifies if the backup set is a Frequent Recovery Point backup.
- -RestoreArchivedBackup <True|False>
- Short form: rstarchbkup
- Restores database from an archived backup.
- -ProxyServer <proxy_server_name>
- Short name: pxy
- Specifies the name of the proxy server.
- Use it with NoAccessToRemoteBackup.
- -NoAccessToRemoteBackup <True|False>
- Short form: noaccessarchivebkup
- Specifies that there is no direct access to the secondary storage system.
SnapManager uses the proxy server to access the secondary storage system.
- -ArchiveBackup <True|False>
- Short name: arch
- Creates an archive of the backup copy created on the primary node. Primary node is the node where backup operation is initiated. Include this parameter if you have datasets configured on your primary node and want to archive the backup copy to the SnapVault secondary storage system.
- -VerifyArchiveBackup <True|False>
- Short name: verarch
- Specifies that the backup copy that has to be verified is an archived backup copy. If you do not specify VerifyArchiveBackup, and one local and one archived backup copy exist with the same name, SnapManager verifies the local backup copy.
- -RestoreArchive <True|False>
- Short name: rstarch
- Restores from archives that are already created.
Example: Restoring database
This command restores exchsnap__SNAPMGR-55_11-10- 2006_13.36.24 to the Storage Group First Storage Group.
restore-backup -server SNAPMGR-48 -storagegroup 'First Storage Group' -backup exchsnap__SNAPMGR-55_11-10- 2006_13.36.24
Example: Restoring from an archive
This command restores exchsnap__SNAPMGR-54_11-10-2006_14.47.18 that was created on the archived server SNAPMGR-54.
restore-backup -server SNAPMGR-48 -StorageGroup 'First Storage Group' -RestoreFromUnmanagedMedia -BkUpServer SNAPMGR-54 -backup exchsnap__SNAPMGR-54_11-10-2006_14.47.18 - SnapInfoDirectory 'K:\SME_Snap\InfoEXCH__SNAPMGR-48A\SG__WZ00\12- 04-2006_14.47.18'
Example: Restoring backup sets created on different Exchange Server
This command restores exchsnap__SNAPMGR-54_11-10-2006_14.47.18 that was created on the server SNAPMGR-54.
restore-backup -server 'SNAPMGR-48' -StorageGroup 'First Storage Group' -RestoreFromUnmanagedMedia -BkUpServer SNAPMGR-54 -backup exchsnap__SNAPMGR-54_11-10-2006_14.47.18 - SnapInfoDirectory 'K:\SME_SnapInfo'
Example: Restoring backup sets to a Recovery Storage Group
This command restores exchsnap__SNAPMGR-55_11-10- 2006_13.36.24 to the Recovery Storage Group Test_rsg.
restore-backup -server SNAPMGR-48 -storagegroup 'First Storage Group' -backup exchsnap__SNAPMGR-55_11-10- 2006_13.36.24 -destination torsg -TargetStorageGroup Test_rsg
Example: Restoring a specified recovery point time backup
This command restores exchsnap__snapmgr-50_03-01-2007_08.00.00 at the recovery point time 03-01-2007_08:55:00.
Restore-backup -Server snapmgr-50 -Storagegroup 'First Storage Group' -backup exchsnap__snapmgr-50_03-01-2007_08.00.00 - RecoveryPointTime : 03-01-2007_08:55:00