Maintain control of your Microsoft 365 data
Post Reply
nroyepic
Service Provider
Posts: 14
Liked: 1 time
Joined: Apr 25, 2023 7:03 pm
Full Name: Nick Roy
Contact:

Export->import add-vboexcludedbackupitem

Post by nroyepic »

Hey all we're transferring a large batch of clients in turn to out new VBO server (and have to recreate the job manually for reasons I'm not getting into in this thread). Is there a way to easily backup and import the excluded items to a job?

I did find a way to export to a csv but import-csv doesn't work via:

$job = Get-VBOJob -Name "Backup Job Name"
Get-VBOExcludedBackupItem -Job $job |export-csv path\filename.csv

But running the same above whilst flipping to add-excludedbackupitem and Import-csv just gives me an array prompt.

Am I stuck entering in ALL of these manually?
Mike Resseler
Product Manager
Posts: 8045
Liked: 1263 times
Joined: Feb 08, 2013 3:08 pm
Full Name: Mike Resseler
Location: Belgium
Contact:

Re: Export->import add-vboexcludedbackupitem

Post by Mike Resseler »

Hi Nick,

Yes, I'm afraid this will be needed. With the many changes we are doing for vNext, things will become much more easier for service providers (By the way, I assume you are a service provider so you should sign-up for the VCSP forums... see below for instructions, you will see other service providers that describe potential workarounds and more).

For the powershell... I assume you use add-VBOExcludedbackupitem. What parameters are you using?

To apply for the VCSP forum, go into the User Control Panel of this forum, select User Groups in the tabs, select "Veeam Cloud Service Provider” and finally the “Join selected” option. As soon as your email address is verified to be part of the Service Provider domain, your application will be approved.
nroyepic
Service Provider
Posts: 14
Liked: 1 time
Joined: Apr 25, 2023 7:03 pm
Full Name: Nick Roy
Contact:

Re: Export->import add-vboexcludedbackupitem

Post by nroyepic »

RE vspc forums, yep we are a service provider a reseller, a cloud connect and pro partner and all the above :) And i recently just got access to the vspc forums thanks for the tip.

RE the parameters I was trying. I am working from service ticket #06134975

For further context we have about 700 exclusions on just one of our clients we provide VBO for, let alone the other ~20 clients we are porting over to the new server so this could quickly become a data entry headache haha.

Code: Select all

$job= get-vbojob "name"
get-vbobackupexclusion $job |export-csv c:\temp\filename.csv
However when using

Code: Select all

add-vbobackupexlcuison $job |import-csv c:\temp\filename.csv
it just gives me a prompt like

Backup[0]:
Mike Resseler
Product Manager
Posts: 8045
Liked: 1263 times
Joined: Feb 08, 2013 3:08 pm
Full Name: Mike Resseler
Location: Belgium
Contact:

Re: Export->import add-vboexcludedbackupitem

Post by Mike Resseler »

I don't believe that will work. Can you use this:

Code: Select all

$job = Get-VBOJob -Name "Name"
$excludeditems = Get-VBOExcludedBackupItem -Job $job
And then to import

Code: Select all

$job = Get-VBOJob -Name "name"
Add-VBOExcludedBackupItem -Job $job -BackupItem $item
The problem what I see is that we need to think on how to get that PowerShell objects over from 1 server to another. I don't have two servers at this point in time but maybe we need to connect to two servers at the same time through PS. @nielsengelen I could use some assistance here?
nielsengelen
Product Manager
Posts: 5636
Liked: 1181 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Export->import add-vboexcludedbackupitem

Post by nielsengelen »

This most likely requires multiple cmdlets to be merged into 1 or 2 CSV files.

First CSV:
$job = Get-VBOJob -Name "Name" # Get jobs
$includeditems = Get-VBOBackupItem -Job $job # included items

Second CSV:
$job = Get-VBOJob -Name "Name" # Get jobs
$excludeditems = Get-VBOExcludedBackupItem -Job $job # excluded items

And then combine these by importing the csv and parsing it. You need to loop through the csv files by first doing something like:
$csv = import-csv c:\temp\filename.csv

And then depending on how it is build the jobs using Add-VBOJob, Add-VBOBackupItem and Add-VBOExcludedBackupItem.
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
nroyepic
Service Provider
Posts: 14
Liked: 1 time
Joined: Apr 25, 2023 7:03 pm
Full Name: Nick Roy
Contact:

Re: Export->import add-vboexcludedbackupitem

Post by nroyepic »

Okay so running these commands the echoing $job prompts/gives me


$included items:
Mailbox : True
ArchiveMailbox : True
OneDrive : True
Sites : True
Teams : True
TeamsChats : False
Type : Organization

$excludeditems (times about 700):
User : name.onmicrosoft.com
Mailbox : True
ArchiveMailbox : True
OneDrive : True
Site : True
Type : SharedMailbox

I can get the CSV files from echo $includeditem |export-csv or even a more basic dos '>' output command but I'm unfamilair with how your getting to a csv and merging them as they are wildly different outputs
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests