Maintain control of your Microsoft Office 365 data
Post Reply
dan.kennedy
Influencer
Posts: 15
Liked: 3 times
Joined: Mar 12, 2019 10:20 am
Full Name: Dan Kennedy
Contact:

Exclude OneDrive Folder - syntax

Post by dan.kennedy »

I'm getting a warning for some swf files in a user's OneDrive and after raising a ticket I was told these files are not supported in OneDrive (it's actually the version history which causes Veeam to throw 403 errors). I would therefore like to exclude the entire folder from the job but everything I've tried so far doesn't work!

I've read the Powershell reference with regards to the Add-VBOJob -ExcludedOneDriveFolders switch here: https://helpcenter.veeam.com/docs/vbo36 ... tml?ver=40 but it doesn't actually show the syntax required for excluding a folder - just that it requires a string. Is this just simply a folder name or do i need to enter the entire path?

The error we get in Veeam is below:

Failed to backup item version: /_vti_history/512/Documents/F Drive/Property/Health & Safety/GE700 CITB October 2013/content/F/SWF-CSK-GE700-2012-F01-18.swf, version: 1.0, The remote server returned an error: (403) Forbidden. :: 0:45:41

Could someone please help me out and tell me the correct syntax for excluding the "GE700 CITB October 2013" folder from this backup job so I can stop the warnings?

nielsengelen
Veeam Software
Posts: 3466
Liked: 691 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Exclude OneDrive Folder - syntax

Post by nielsengelen »

You can just use -ExcludedOneDriveFolders "GE700 CITB October 2013"

Example:

Code: Select all

Import-Module "C:\Program Files\Veeam\Backup365\Veeam.Archiver.PowerShell\Veeam.Archiver.PowerShell.psd1"

$Org = Get-VBOOrganization -Name "ORG"
$Repo = Get-VBORepository -Name "XYZ"
$ItemsToBackup = New-VBOBackupItem -Organization $Org -OneDrive
Add-VBOJob -Organization $Org -Name "ONEDRIVE BACKUP" -Repository $Repo -SelectedItems $ItemsToBackup -ExcludedOneDriveFolders "GE700 CITB October 2013"
https://foonet.be

dan.kennedy
Influencer
Posts: 15
Liked: 3 times
Joined: Mar 12, 2019 10:20 am
Full Name: Dan Kennedy
Contact:

Re: Exclude OneDrive Folder - syntax

Post by dan.kennedy »

OK thanks so I can just use the folder name as the exclusion - will this then apply to any other users who have that folder in their OneDrive?
Also, does this only work when you add a new job with Add-VBOJob? I was trying to add the exclusion to an existing job with Set-VBOJob - I assume it will still work as the switch is also included with that cmdlet?

nielsengelen
Veeam Software
Posts: 3466
Liked: 691 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Exclude OneDrive Folder - syntax

Post by nielsengelen »

Yes, it can also work with Set-VBOJob. I just made a quick test as an example with Add-VBOJob. This will exclude the folder for all users. If you want this for a specific user then you'll need to make a specific job for them and exclude that user in all other OneDrive jobs.

Keep in mind, it may be useful to contact support to see why we get a 403 on the folders and it may be possible to resolve it without the exclusion. I will leave the call up to you there :-)
https://foonet.be

dan.kennedy
Influencer
Posts: 15
Liked: 3 times
Joined: Mar 12, 2019 10:20 am
Full Name: Dan Kennedy
Contact:

Re: Exclude OneDrive Folder - syntax

Post by dan.kennedy »

I actually raised a ticket previously regarding the swf files (Case ID 03828856) but it got pushed back to Microsoft who then told me swf files aren't actually supported in OneDrive!
Thanks for your help though, I've added the exclusion and will see what happens when the job runs again tonight.

nielsengelen
Veeam Software
Posts: 3466
Liked: 691 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Exclude OneDrive Folder - syntax

Post by nielsengelen »

Ah right, I forgot about the swf rule at Microsoft! I may need more coffee this morning. Keep us posted if all goes well (or not).
https://foonet.be

slackhouse
Novice
Posts: 9
Liked: never
Joined: May 21, 2018 12:13 pm
Full Name: Jeremy Slack
Contact:

Re: Exclude OneDrive Folder - syntax

Post by slackhouse »

Another way to handle this would be to block that specific file type from being synced by OneDrive in the OneDrive Admin Center. Click Sync -> checking the box for "Block syncing of specific file types", then entering the file type to block (swf). You would still need to do some cleanup for the user who already has these files uploaded. But, that would keep your OneDrive from having unsupported file types in it.

dan.kennedy
Influencer
Posts: 15
Liked: 3 times
Joined: Mar 12, 2019 10:20 am
Full Name: Dan Kennedy
Contact:

Re: Exclude OneDrive Folder - syntax

Post by dan.kennedy »

I did suggest we remove the files from the user's OneDrive initially but they are part of some sort of Health & Safety training course that they have to run at different customer sites so they were adamant the files need to stay in OneDrive so they could access them easily! :( The files themselves sync up fine - the only thing that isn't supported by Microsoft with the swf files is version history (which is what i think is causing the error in the backup).

Unfortunately i still got the warning when the job ran last night.
I've double checked the job in Powershell and the folder should be excluded:

$job = Get-VBOJob -Name "****"
Set-VBOJob -Job $job -ExcludedOneDriveFolders "GE700 CITB October 2013"

If i then run $job.ExcludedOneDriveFolders it shows "GE700 CITB October 2013"

But still getting the same error when the job runs....

Processing OneDrive **** (https://****/personal/****_com) finished with warning: Failed to backup item version: /_vti_history/512/Documents/01. ****/Health and Safety/REGS/GE700 CITB October 2013/content/F/SWF-CSK-GE700-2012-F01-16.swf, version: 1.0, The remote server returned an error: (403) Forbidden. :: 0:35:20

nielsengelen
Veeam Software
Posts: 3466
Liked: 691 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Exclude OneDrive Folder - syntax

Post by nielsengelen »

Hi Dan, I suggest to open up a support case for insight why it is being ignored. Logs should be able to help but for now via the forums, it's a bit hard to tell. Could you let me know the support case ID so we can follow it to see what is causing this?
https://foonet.be

Polina
Veeam Software
Posts: 1307
Liked: 222 times
Joined: Oct 21, 2011 11:22 am
Full Name: Polina Vasileva
Contact:

Re: Exclude OneDrive Folder - syntax

Post by Polina »

Dan,

AFAIR, the specified folder is by default considered to be a root folder. If you need to exclude a subfolder, put a full path to it from the root folder, like this: “Folder A\Folder B”.
Verifying it as I write this (will take a few more minutes), but this is how explicit folder selection works, and it should be the same for exclusions.

dan.kennedy
Influencer
Posts: 15
Liked: 3 times
Joined: Mar 12, 2019 10:20 am
Full Name: Dan Kennedy
Contact:

Re: Exclude OneDrive Folder - syntax

Post by dan.kennedy »

OK thanks - I just assumed the folder exclusion would be recursive so that might be the problem!

I've changed the folder exclusion to "GE700 CITB October 2013\content\F" so will see what happens when the job runs tonight.
If it still throws the error I will get a ticket raised to figure it out.

Polina
Veeam Software
Posts: 1307
Liked: 222 times
Joined: Oct 21, 2011 11:22 am
Full Name: Polina Vasileva
Contact:

Re: Exclude OneDrive Folder - syntax

Post by Polina »

Sounds like a plan :)

Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests