Maintain control of your Microsoft 365 data
Post Reply
PaulNSW
Enthusiast
Posts: 52
Liked: 8 times
Joined: May 14, 2012 10:48 am
Contact:

Deleting all OneDrive backups

Post by PaulNSW »

Will this PS script delete all OneDrive backups within the repository, leaving the rest in-tact? I changed settings from another post in the forum, but just want to double-check.

Code: Select all

$repo = Get-VBORepository -Name "backup_repo_name"
$usersList = Get-VBOEntityData -Type User -Repository $repo

foreach ($user in $usersList) {
 Remove-VBOEntityData -Repository $repo -User $user -OneDrive -Confirm:$false
}
nielsengelen
Product Manager
Posts: 5797
Liked: 1215 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Deleting all OneDrive backups

Post by nielsengelen »

This will delete all the OneDrive data.

If u remove "-Confirm:$false", you will have to confirm before deletion (if you want to play safe).
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
PaulNSW
Enthusiast
Posts: 52
Liked: 8 times
Joined: May 14, 2012 10:48 am
Contact:

Re: Deleting all OneDrive backups

Post by PaulNSW »

Great! Thanks for confirming :)
hbilke
Expert
Posts: 118
Liked: 5 times
Joined: Jan 14, 2017 9:05 pm
Contact:

Re: Deleting all OneDrive backups

Post by hbilke »

The only data taht is deleted is from within the personal OneDrive, is this correct?

hRy
Polina
Veeam Software
Posts: 3195
Liked: 774 times
Joined: Oct 21, 2011 11:22 am
Full Name: Polina Vasileva
Contact:

Re: Deleting all OneDrive backups

Post by Polina »

With the above script, you will delete all backed-up OneDrive accounts from your repository; user mailboxes and personal sites (if any) will remain untouched in the backup.
hbilke
Expert
Posts: 118
Liked: 5 times
Joined: Jan 14, 2017 9:05 pm
Contact:

Re: Deleting all OneDrive backups

Post by hbilke »

Thanks Polina!

Is there a way to check how much has been saved after the processing or will veeam365 just reuse the "white space"?

hRy
Polina
Veeam Software
Posts: 3195
Liked: 774 times
Joined: Oct 21, 2011 11:22 am
Full Name: Polina Vasileva
Contact:

Re: Deleting all OneDrive backups

Post by Polina »

If you're using local volumes and JET-based repositories, backup databases will not shrink but the free space will be reused on the next runs.
Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests