Get all used backup repositories of a backup job

PowerShell script exchange

Get all used backup repositories of a backup job

Veeam Logoby edirschedl » Wed Aug 09, 2017 8:46 am

Hi,

we have some big scale-out repositories with a lot of extends.
With help of a script, I want to get all used extends of a single backup job. So for example I've a job called "Backup 1" and it has backup files on "Extend 1", "Extend 2" and "Extend 3" in a Scale-Out-Repo with 10 extends total.
How do I get this information on which extends there are backup files of this specific backup job - with help of a powershell script?


Thank you for your tips / advices.

Emanuel
edirschedl
Influencer
 
Posts: 20
Liked: 2 times
Joined: Thu Jul 21, 2016 12:29 pm

Re: Get all used backup repositories of a backup job

Veeam Logoby v.Eremin » Wed Aug 09, 2017 5:38 pm

Backup object (Get-VBRBackup) contains identifier of repository it resides on ($Backup.info.RepositoryId).

If my assumption is correct and this property provides identifier of extent, not of Scale-Out Backup Repository as a whole, you should be able to find needed extent, using it. (VBRRepositoryExtent)
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Get all used backup repositories of a backup job

Veeam Logoby edirschedl » Fri Aug 11, 2017 5:45 am

Sadly RepositoryID is the same ID as the Scale-Repo itself (or ParentID from the single extents). So that's no information to get the specific extents where the backup files are located.
edirschedl
Influencer
 
Posts: 20
Liked: 2 times
Joined: Thu Jul 21, 2016 12:29 pm

Re: Get all used backup repositories of a backup job

Veeam Logoby v.Eremin » Fri Aug 11, 2017 4:20 pm

I do not have a good lab at hand to test the script, but at least it should give you the right directions:

Code: Select all
Asnp VeeamPssnapin
$Backup = (Get-VBRBackup | where {$_.Jobname -eq "Name of job pointed to SOBR"})
$Backup.GetOibs() | select name, {$_.FindChainRepositories().name}

Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 4 guests