Hello everyone
I am trying to restore files in a specific path from the current backup restore point.
The number of files to be restored is large and scattered, so it is done using a powershell script.
The backup image is that of the NAS server.
The command used is Save-VBRNASBackupFLRItem.
However, when recovering through the command below, if the type is a folder, only the entire folder is restored.
However, I want to select and recover only some files, not all files in the folder.
What should I do?
## Powershell script (test environment)
$nfs_source = Get-VBRNASServer | Where-Object {$_.path -eq "nas:/nfs"}
$nfs_restore = Get-VBRNASServer | Where-Object {$_.path -eq "nas:/restore"}
$path_restore = Get-VBRNASServerPath -Server $nfs_restore
$restorepoint_nfs=Get-VBRNASBackupRestorePoint | Where-Object {$_.NASServerName -eq "nas:/nfs" -and $_.CreationTime.tostring() -eq "5/25/2023 11:47:43 AM"}
$restore_session_nfs = Start-VBRNASBackupFLRSession -RestorePoint $restorepoint_nfs
$list_files = Get-VBRNASBackupFLRItem -Session $restore_session_nfs
Save-VBRNASBackupFLRItem -Item $list_filess0] -Server $nfs_restore -Path $($path_restore+"/test") -PreservePermissions:$true
Stop-VBRNASBackupFLRSession -Sessio $restore_session_nfs
$list_files is as below
PS C:\test> $list_files
Type : Folder
CreationDate: 2023-05-25 10:19:22 AM
Path : file1
Name: file1
Parent:
ModificationDate : 2023-05-25 10:19:22 AM
VersionId : 4
Size : 450733505
Type : File
CreationDate: 2/28/2023 11:45:06 AM
Path : bandicam 2023-02-28 09-32-01-032.mp4
Name : bandicam 2023-02-28 09-32-01-032.mp4
Parent:
ModificationDate: 2/28/2023 11:45:06 AM
VersionId : 4
Size : 457012698
Type : File
CreationDate: 2023-02-28 4:38:07 PM
Path : bandicam 2023-02-28 14-14-16-827.mp4
Name : bandicam 2023-02-28 14-14-16-827.mp4
Parent:
ModificationDate : 2023-02-28 4:38:07 PM
VersionId : 4
Size : 457012698
Type : File
CreationDate: 2023-02-28 4:38:07 PM
Path : copy1-1.mp4
Name : copy1-1.mp4
Parent:
ModificationDate : 2023-02-28 4:38:07 PM
VersionId : 4
Size : 450733505
Type : File
CreationDate: 2/28/2023 11:45:06 AM
Path : copy2-2.mp4
Name : copy2-2.mp4
Parent:
ModificationDate: 2/28/2023 11:45:06 AM
VersionId : 4
Size : 5765996544
Type : File
CreationDate: 6/16/2017 6:05:32 PM
Path : SW_DVD9_Win_Svr_STD_Core_and_DataCtr_Core_2016_64Bit_Korean_-2_MLF_X21-22833.ISO
Name : SW_DVD9_Win_Svr_STD_Core_and_DataCtr_Core_2016_64Bit_Korean_-2_MLF_X21-22833.ISO
Parent:
ModificationDate : 2017-06-16 6:05:32 PM
VersionId : 4
Below is the file list of the test nas server.
(top is nas:/nfs , bottom is nas:/nfs/file1)
Thanks for reading.