Maintain control of your Microsoft 365 data
Post Reply
roguegeek
Novice
Posts: 9
Liked: never
Joined: Jun 29, 2018 1:07 pm
Contact:

Powershell Restoring from O365 Groups

Post by roguegeek »

Good Morning,

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"
Up to here everything is fine no issues. The problem is with the next line.

$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"?
Mike Resseler
Product Manager
Posts: 8045
Liked: 1263 times
Joined: Feb 08, 2013 3:08 pm
Full Name: Mike Resseler
Location: Belgium
Contact:

Re: Powershell Restoring from O365 Groups

Post by Mike Resseler »

Hey Roguegeek,

For as far as I know, that is the only possibility I'm afraid. When we load the restorepoint, you will need to crawl through it to find what is inside. When we load the restore explorers, we do the same. The only strange I see that it takes 45 minutes. How large is that document library?
roguegeek
Novice
Posts: 9
Liked: never
Joined: Jun 29, 2018 1:07 pm
Contact:

Re: Powershell Restoring from O365 Groups

Post by roguegeek »

over 2tb

Its unfortunate that both PS and the explorer don't work with the same efficiency. I understand they both have to do the same thing, but its obvious the explorer does it much better. I don't have to wait for it to catalog anything like I do using PS. It feels a lot less flexible now. Oh well thanks for the assistance.
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests