Looking for some powershell sage advise from any guru's currently out there. I am trying to restore numerous files and folders across different o365 groups and their document libraries using the Veeam powershell module. The problem is I can't seem to find a way to restore anything without first PS cataloging the entire document library which can take quite a bit of time depending on the size of the library. The code I am using is below.
Code: Select all
$restoreDate = (get-date 8/21/22).date
$job = Get-VBOJob -Name "Groups"
$restorepoint = Get-VBORestorePoint -Job $job | ?{$_.backuptime.date -eq $restoreDate}
$session = Start-VBOSharePointItemRestoreSession -RestorePoint $restorepoint -Server "server.domain.com"
$organization = Get-VESPOrganization -Session $session
$site = Get-VESPSite -Organization $organization -Name "TheSite"
$library = Get-VESPDocumentLibrary -Site $site -Name "Documents"
$documents = Get-VESPDocument -DocumentLibrary $library
After running the above line I now have to wait for it to catalog the entire library. Even if I omit -recurse, which should then only give me the root folders, still reads the entire library it would seem.
I have tried playing with the -query on a file I know is at the root of the library and still after 45m of waiting the progress bar has barely moved which to me implies its still reading the entire library.
Is there a way to restore files and folders using Veeam's PS module that doesn't require it to catalog the entire library first or that will except a direct path to the file or folder "sites/MySite/Shared Documents/FolderThatNeedsToBeRestore"?