-
- Novice
- Posts: 9
- Liked: never
- Joined: Jan 10, 2019 11:18 am
- Full Name: Christian Pellicci
- Contact:
Clearing Back-up Repositories
Was just wandering if there was script to completely wipe a back-up repository.
Many thanks in advance,
Many thanks in advance,
-
- Product Manager
- Posts: 8191
- Liked: 1322 times
- Joined: Feb 08, 2013 3:08 pm
- Full Name: Mike Resseler
- Location: Belgium
- Contact:
Re: Clearing Back-up Repositories
Hi Chrigp,
Not sure what your intention is. Do you want to remove an entire backup repository? Or clean-out certain data of a certain user(s)?
Not sure what your intention is. Do you want to remove an entire backup repository? Or clean-out certain data of a certain user(s)?
-
- Novice
- Posts: 9
- Liked: never
- Joined: Jan 10, 2019 11:18 am
- Full Name: Christian Pellicci
- Contact:
Re: Clearing Back-up Repositories
Hi Mike,
Want to remove an entire backup repository.
Kind regards
Want to remove an entire backup repository.
Kind regards
-
- Product Manager
- Posts: 5797
- Liked: 1215 times
- Joined: Jul 15, 2013 11:09 am
- Full Name: Niels Engelen
- Contact:
Re: Clearing Back-up Repositories
There are multiple options here. If you don't use the repository anymore, you can just remove it from the GUI and afterward go to the directory and shift+delete everything.
Additionally, you can leverage Powershell and use Remove-VBOEntityData.
A script which should do the work (it won't remove the files however but it will clear the repository):
If you want to wipe the directory, you should leverage native PowerShell "Remove-Item -Recurse -Force c:\myrepo".
Additionally, you can leverage Powershell and use Remove-VBOEntityData.
A script which should do the work (it won't remove the files however but it will clear the repository):
Code: Select all
Import-Module "C:\Program Files\Veeam\Backup365\Veeam.Archiver.PowerShell\Veeam.Archiver.PowerShell.psd1"
$repo = Get-VBORepository -Name "REPONAME"
$usersList = Get-VBOEntityData -Type User -Repository $repo
$groupsList = Get-VBOEntityData -Type Group -Repository $repo
$sitesList = Get-VBOEntityData -Type Site -Repository $repo
foreach ($user in $usersList) {
Remove-VBOEntityData -Repository $repo -User $user -Mailbox -ArchiveMailbox -OneDrive -Sites -Confirm:$false
}
foreach ($group in $groupsList) {
Remove-VBOEntityData -Repository $repo -Group $group -Mailbox -ArchiveMailbox -OneDrive -Sites -GroupMailbox -GroupSite -Confirm:$false
}
foreach ($site in $sitesList) {
Remove-VBOEntityData -Repository $repo -Site $site -Confirm:$false
}
Remove-VBORepository -Repository $repo -Confirm:$false
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
GitHub: https://github.com/nielsengelen
-
- Novice
- Posts: 9
- Liked: never
- Joined: Jan 10, 2019 11:18 am
- Full Name: Christian Pellicci
- Contact:
Re: Clearing Back-up Repositories
Many thanks,
Knew how to do through the GUI, just wanted a script that did such. Script worked perfectly.
Kind regards
Knew how to do through the GUI, just wanted a script that did such. Script worked perfectly.
Kind regards
Who is online
Users browsing this forum: No registered users and 9 guests