Maintain control of your Microsoft 365 data
Post Reply
pesos
Expert
Posts: 223
Liked: 22 times
Joined: Nov 12, 2014 9:40 am
Full Name: John Johnson
Contact:

is there a good way to dump all mailboxes?

Post by pesos »

We want to do an offsite encrypted backup, so I'd like to dump all mailboxes from o365 backup.

Oddly the gui doesn't appear to allow for this. So I found another thread that provided this pshell:

$mailboxes = Get-VEXMailbox -Database $database
foreach ($user in $mailboxes)
{
$mailbox = Get-VEXMailbox -Database $database -name $user
Export-VEXItem -Mailbox $mailbox -To "Z:\pst\ala\$($user.Email).pst"
}


So we ran this and it hit an error about 50 mailboxes into 500ish (Connection to server was unexpectedly closed. See log file for details). So now we either have to run it again and start from scratch, or find a way to try and exempt the ones that completed.

Is there a better way to handle this? Thanks!
nielsengelen
Product Manager
Posts: 5797
Liked: 1215 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: is there a good way to dump all mailboxes?

Post by nielsengelen »

I believe you can contact support for assistance here to increase the time-out. For now, PowerShell is the only feasable workaround.
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
pesos
Expert
Posts: 223
Liked: 22 times
Joined: Nov 12, 2014 9:40 am
Full Name: John Johnson
Contact:

Re: is there a good way to dump all mailboxes?

Post by pesos »

There is an actual timeout? Ugh.
nielsengelen
Product Manager
Posts: 5797
Liked: 1215 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: is there a good way to dump all mailboxes?

Post by nielsengelen »

Well, I said I believe :-). It is a bit hard to say since I don’t know which error it is exactly and therefor I suggested to contact support. If you do, please let us know the support ID.
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
pesos
Expert
Posts: 223
Liked: 22 times
Joined: Nov 12, 2014 9:40 am
Full Name: John Johnson
Contact:

Re: is there a good way to dump all mailboxes?

Post by pesos »

Thank you Neilsen. So as far as the actual question (design/approach to best do an mass export) do you have any thoughts?
pesos
Expert
Posts: 223
Liked: 22 times
Joined: Nov 12, 2014 9:40 am
Full Name: John Johnson
Contact:

Re: is there a good way to dump all mailboxes?

Post by pesos »

Get-VBOMailboxProtectionReport : Cannot bind parameter 'Organization'. Cannot convert the
"tenant.onmicrosoft.com" value of type "System.String" to type
"Veeam.Archiver.PowerShell.Model.VBOOrganization".

I've tried this report with both the tenant name as shown above as well as the guid (both exactly as reported by get-vboorganization) but I get the error above in both cases.
Mike Resseler
Product Manager
Posts: 8191
Liked: 1322 times
Joined: Feb 08, 2013 3:08 pm
Full Name: Mike Resseler
Location: Belgium
Contact:

Re: is there a good way to dump all mailboxes?

Post by Mike Resseler »

Pesos,

You need to grab the object itself and use it as a paramter

So something like: $organization = get-vboorganization...

Get-VBOMailboxProtectionReport ... -organization $organization
pesos
Expert
Posts: 223
Liked: 22 times
Joined: Nov 12, 2014 9:40 am
Full Name: John Johnson
Contact:

Re: is there a good way to dump all mailboxes?

Post by pesos »

perfect, thanks Mike! with this dump we can at least do some cleanup and then use the csv to process the restores in smaller batches.
pesos
Expert
Posts: 223
Liked: 22 times
Joined: Nov 12, 2014 9:40 am
Full Name: John Johnson
Contact:

Re: is there a good way to dump all mailboxes?

Post by pesos »

This is generally going fine (although tedious) - but it seems to be erroring when encountering archives - is there a way to get those to properly export?

Export-VEXItem : Cannot convert 'John Doe In-Place Archive - John Doe' to the type
'Veeam.Exchange.PowerShell.Model.Items.VEXMailbox' required by parameter 'Mailbox'. Specified
method is not supported.
pesos
Expert
Posts: 223
Liked: 22 times
Joined: Nov 12, 2014 9:40 am
Full Name: John Johnson
Contact:

Re: is there a good way to dump all mailboxes?

Post by pesos »

Any thoughts on the archive thing?

Also, are there improvements to the restore process coming for large batches? It literally took a month and a half of processing in batches to get 1100 mailboxes dumped to pst.

Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests