Skip to main content
SnapCenter 4.9 cmdlets

Restore-SdSnapshot

Contributors

Restores files and directories from a primary or secondary Snapshot copy, on Windows disks or SMB shares.

Syntax

Restore-SdSnapshot [-Path]  <Object[]>  [-Snapshot]  <String>  [-StorageSystem]  <String>  [-VolumeName]  <String>  [-ForceRestore]  <>  [-Session]  <String>  [-Host]  <String>

Detailed Description

Restores files and directories from a primary or secondary Snapshot copy, on Windows disks or SMB shares.When you are restoring from a Snapshot copy on a share, you can restore everything from that Snapshot copy. When you are restoring from a Snapshot copy in a SAN environment, you can restore disks only.When you are restoring from the secondary Snapshot copy, you must have a CIFS server on the secondary server. When you are restoring multiple files or directories under the same SMB share from your SnapVault secondary, you cannot specify the CIFS server name in the path by referring to IP/Name/Fully qualified domain name (FQDN.) You must speciy the CIFS server name using only IP or Name or FQDN. Related cmdlets: New-SdSnapshot and Get-SdSnapshot

Parameters

Name Description Required? Pipeline Input Default Value

Path

Specifies the location of the files, directories, and disks for the Snapshot copies you want to restore. You cannot mix a logical disk or mount point with SMB shares in the same input path.

true

true (ByPropertyName)

Snapshot

Specifies the Snapshot copy name you want to restored.

true

true (ByPropertyName)

StorageSystem

Name of the storage system in which the Snapshot copy specified for the restore operation is located.

false

true (ByPropertyName)

VolumeName

Name of the storage system volume in which the Snapshot copy specified for the restore operation is located.

false

true (ByPropertyName)

ForceRestore

Indicates whether the Snapshot copy should be forcibly restored. If you want to overwrite existing versions of the files or directories you are restoring, this parameter is required.

false

true (ByPropertyName)

Session

false

true (ByPropertyName)

Host

Specifies the name or IP address of the host on which you execute the operation. The default is your local machine.

false

true (ByPropertyName)

Examples

Example 1: Restoring a Snapshot copy on a SMB share from a Snapshot copy

 PS C:\> Restore-SdSnapshot -Path "\\172.17.12.101\share\files.txt" -Snapshot "snapshot_1"

This example restores the file named file.txt on SMB share "\\172.17.12.101\share" from specified Snapshot copy "snapshot_1".

Example 2: Restoring a file under a subfolder of a SMB share from a Snapshot copy

 PS C:\> Restore-SdSnapshot -Path "\\172.17.12.101\share\dir1\file1.txt" -Snapshot snapshot_1

This example restores the file on "\\172.17.12.101\share\dir1\file1.txt" from Snapshot copy snapshot_1.

Example 3: Restoring a directory with its contents under a SMB share from a Snapshot copy

 PS C:\> Restore-SdSnapshot -Path "\\172.17.12.101\share\folder1\*" -Snapshot "snapshot_1"

This example restores the directory named "folder1" and its contents from the specified Snapshot copy "snapshot_1".

Example 4: Restoring multiple files and directories under a SMB share from a Snapshot copy

 PS C:\> Restore-SdSnapshot -Path "\\172.17.12.101\share\file0.txt","\\172.17.12.101\share\dir1\file1.txt","\\172.17.12.101\share\dir2\*","\\172.17.12.101\share\dir3\*" -Snapshot snapshot_1

This example restores a file named "file0.txt" under the root of the SMB share, a named "file1.txt" under directory "dir1", directory named "dir2" and "dir3" and their contents, from the Snapshot copy named "snapshot_1".

Example 5: Restoring a file on a SMB share from a Snapshot copy on the SnapVault secondary

 PS C:\> Restore-SdSnapshot -Path "\\172.17.12.101\share\dir1\file1.txt" -Snapshot "snapshot_1" -StorageSystem 172.17.165.29 -VolumeName vaultdest_vol

This example restores a file named "file1.txt" under directory "dir1" from the Snapshot copy named "snapshot_1" on the SnapVault secondary storage system.

Example 6: Restoring a Snapshot copy on a disk from a Snapshot copy

 PS C:\> Restore-SdSnapshot -Path E: -Snapshot "snapshot_1"

This example restores the Snapshot named file.txt on disk drive E: from specified Snapshot copy "snapshot_1."