{"id":60512,"date":"2024-02-15T09:00:49","date_gmt":"2024-02-15T08:00:49","guid":{"rendered":"https:\/\/nolabnoparty.com\/?p=60512"},"modified":"2024-02-13T11:19:59","modified_gmt":"2024-02-13T10:19:59","slug":"veeam-backup-for-microsoft-365-delete-onedrive-backup","status":"publish","type":"post","link":"https:\/\/nolabnoparty.com\/en\/veeam-backup-for-microsoft-365-delete-onedrive-backup\/","title":{"rendered":"Veeam Backup for Microsoft 365 delete OneDrive backup"},"content":{"rendered":"<p><img decoding=\"async\" class=\"aligncenter wp-image-60515 size-full\" title=\"veeam-vbo-delete-onedrive-backup-01\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2024\/02\/veeam-vbo-delete-onedrive-backup-01.jpg\" alt=\"veeam-vbo-delete-onedrive-backup-01\" width=\"602\" height=\"202\" \/><\/p>\n<p>To avoid running out of space in the Backup Repository used by <a href=\"https:\/\/nolabnoparty.com\/en\/veeam-backup-for-office-365-v4-0-setup-object-storage-as-repository-pt-2\/\">Veeam Backup for Microsoft 365<\/a>, it may be useful to delete OneDrive backup to <strong>make room in the storage<\/strong>.<\/p>\n<p>Based on the 365 used plan, Microsoft 365 users have by default <strong>1TB OneDrive space available<\/strong> and it's easy to imagine that you need a large Backup Repository to store all users' files.<!--more--><\/p>\n<p>&nbsp;<\/p>\n<h2>Delete OneDrive backup<\/h2>\n<p>While in <a href=\"https:\/\/nolabnoparty.com\/en\/upgrade-veeam-backup-replication-to-v12-1\/\">Veeam Backup &amp; Replication<\/a> you can <strong>delete specific backups<\/strong> easily, in <a href=\"https:\/\/go.veeam.com\/hands-on-lab-experience-microsoft-365\" target=\"_blank\" rel=\"noopener\">Veeam Backup for Microsoft 365<\/a> the situation is more complicated as the <strong>backup mechanism is different<\/strong>. All 365 backups are <strong>part of the \"same file\"<\/strong> and you cannot remove them with a simple click. Using PowerShell is however a quite simple solution to delete OneDrive backup.<\/p>\n<p>First we need to check the Backup Repository usage to evaluate if the storage is <strong>running out of space<\/strong>. Go to <strong>Backup Infrastructure<\/strong> &gt; <strong>Backup Repository<\/strong> section and select the Repository to analyze. In the example there are <strong>1.9 TB<\/strong> free space.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-60517 size-large\" title=\"veeam-vbo-delete-onedrive-backup-02\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2024\/02\/veeam-vbo-delete-onedrive-backup-02-600x170.jpg\" alt=\"veeam-vbo-delete-onedrive-backup-02\" width=\"600\" height=\"170\" \/><\/p>\n<p>Before proceeding with the delete OneDrive backup operation, it is recommended to <strong>disable the OneDrive Backup Job<\/strong>. Right click the Backup job and select <strong>Disable<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-60519 size-large\" title=\"veeam-vbo-delete-onedrive-backup-03\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2024\/02\/veeam-vbo-delete-onedrive-backup-03-600x370.jpg\" alt=\"veeam-vbo-delete-onedrive-backup-03\" width=\"600\" height=\"370\" \/><\/p>\n<p>Make sure the Backup Job is disabled.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-60521 size-large\" title=\"veeam-vbo-delete-onedrive-backup-04\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2024\/02\/veeam-vbo-delete-onedrive-backup-04-600x261.jpg\" alt=\"veeam-vbo-delete-onedrive-backup-04\" width=\"600\" height=\"261\" \/><\/p>\n<p>Now open a text editor like Notepad and paste the <strong>following script<\/strong>:<\/p>\n<blockquote><p>$repo = Get-VBORepository -Name \"Name_Repository\"<br \/>\n$usersList = Get-VBOEntityData -Type User -Repository $repo<\/p>\n<p>foreach ($user in $usersList) {<br \/>\nRemove-VBOEntityData -Repository $repo -User $user -OneDrive -Confirm:$false<br \/>\n}<\/p><\/blockquote>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-60523 size-large\" title=\"veeam-vbo-delete-onedrive-backup-05\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2024\/02\/veeam-vbo-delete-onedrive-backup-05-600x181.jpg\" alt=\"veeam-vbo-delete-onedrive-backup-05\" width=\"600\" height=\"181\" \/><\/p>\n<p>Open the <strong>Veeam Backup for Microsoft 365 PowerShell Toolkit<\/strong> and run the script. The script <strong>will only delete OneDrive backup<\/strong> leaving Exchange, SharePoint or Teams backups untouched.<\/p>\n<p><span style=\"color: #0000ff;\">PS C:\\&gt; .\\script_name.ps1<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-60525 size-large\" title=\"veeam-vbo-delete-onedrive-backup-06\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2024\/02\/veeam-vbo-delete-onedrive-backup-06-600x275.jpg\" alt=\"veeam-vbo-delete-onedrive-backup-06\" width=\"600\" height=\"275\" \/><\/p>\n<p>The OneDrive data are removed from the Backup Repository.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-60527 size-large\" title=\"veeam-vbo-delete-onedrive-backup-07\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2024\/02\/veeam-vbo-delete-onedrive-backup-07-600x567.jpg\" alt=\"veeam-vbo-delete-onedrive-backup-07\" width=\"600\" height=\"567\" \/><\/p>\n<p>After a few minutes, the process has completed successfully.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-60533 size-large\" title=\"veeam-vbo-delete-onedrive-backup-08\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2024\/02\/veeam-vbo-delete-onedrive-backup-08-600x154.jpg\" alt=\"veeam-vbo-delete-onedrive-backup-08\" width=\"600\" height=\"154\" \/><\/p>\n<p>Checking the repository, the available space is now <strong>2.9 TB<\/strong>. In this example, deleting the OneDrive backup saved 1TB space in the Backup Repository.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-60535 size-large\" title=\"veeam-vbo-delete-onedrive-backup-09\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2024\/02\/veeam-vbo-delete-onedrive-backup-09-600x170.jpg\" alt=\"veeam-vbo-delete-onedrive-backup-09\" width=\"600\" height=\"170\" \/><\/p>\n<p>If you have issues with OneDrive backup, using this script can help to <strong>free up storage space<\/strong>.<\/p>\n<p><img decoding=\"async\" title=\"signature\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/images\/firma.jpg\" alt=\"signature\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To avoid running out of space in the Backup Repository used by Veeam Backup for Microsoft 365, it may be useful to delete OneDrive backup to make room in the storage. Based on the 365 used plan, Microsoft 365 users have by default 1TB OneDrive space available and it's easy to imagine that you need a large Backup Repository to store all users' files.<\/p>\n","protected":false},"author":3,"featured_media":60515,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rop_custom_images_group":[],"rop_custom_messages_group":[],"rop_publish_now":"initial","rop_publish_now_accounts":{"linkedin_93tdZWzMZc_93tdZWzMZc":"","facebook_2879994398731222_17841400390232720":"","twitter_113568041_113568041":"","mastodon_115463926174894442_115463926174894442":""},"rop_publish_now_history":[],"rop_publish_now_status":"pending","footnotes":""},"categories":[2138,933],"tags":[579,1886,1979],"class_list":["post-60512","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-backup-en","category-veeam-en","tag-backup-en","tag-onedrive","tag-repository-en","has_thumb"],"_links":{"self":[{"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/posts\/60512","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/comments?post=60512"}],"version-history":[{"count":0,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/posts\/60512\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/media\/60515"}],"wp:attachment":[{"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/media?parent=60512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/categories?post=60512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/tags?post=60512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}