Weekly Active Full Backup and Size

PowerShell script exchange

Weekly Active Full Backup and Size

Veeam Logoby makirkbride » Fri Jul 24, 2015 2:17 pm

I am trying to write a Powershell script that will give me a list of Jobname, Job/Backup size, and Day(s) that the active full backup is scheduled.

Basically what I'm after is to spread the jobs over the 7 days of the week to do the weekly full backups. We separate out our jobs by client so have well over 100 to look through.
makirkbride
Lurker
 
Posts: 2
Liked: 1 time
Joined: Wed Jul 22, 2015 6:51 pm
Full Name: Mark Kirkbride

Re: Weekly Active Full Backup and Size

Veeam Logoby v.Eremin » Fri Jul 24, 2015 4:07 pm

Try the following one-liner, it uses parts of different scripts available on our community (for instance, this one was quite useful):

Code: Select all
Get-VBRJob | select @{N="Job Name";E={$_.Name}}, @{N="Size";E={[math]::Round(((Get-VBRBackup -name ($_.Name)).GetStorages().Stats.BackupSize | Measure-Object -sum).Sum/1gb,1)}}, @{N="Full Backup Days";E={$_.BackupTargetOptions.FullBackupDays}}


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

Re: Weekly Active Full Backup and Size

Veeam Logoby makirkbride » Mon Jul 27, 2015 6:39 pm 1 person likes this post

Excellent. Thank you.
makirkbride
Lurker
 
Posts: 2
Liked: 1 time
Joined: Wed Jul 22, 2015 6:51 pm
Full Name: Mark Kirkbride

Re: Weekly Active Full Backup and Size

Veeam Logoby v.Eremin » Tue Jul 28, 2015 7:47 am

Should other assistance with scripting be needed, feel free to contact us. Thanks.
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 973 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Weekly Active Full Backup and Size

Veeam Logoby kbay » Thu Sep 24, 2015 8:46 pm

Great script, thank you! does this provide the raw/non-deduped backup size?
kbay
Novice
 
Posts: 3
Liked: never
Joined: Wed Feb 01, 2012 2:30 pm
Full Name: Kira

Re: Weekly Active Full Backup and Size

Veeam Logoby v.Eremin » Mon Sep 28, 2015 2:33 pm

It's the size that backup file occupies on a repository. And data inside backup file is present in compressed/deduplicated state in most cases (as long as those options are enabled in job settings). Thanks.
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 973 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Weekly Active Full Backup and Size

Veeam Logoby xefil » Tue Jun 14, 2016 6:57 am

Hello,

I need to get the usage of my backups as well but the above example gives me the SIZE column empty.
Seems the method GetStorages() doesn't exist. The resto of the informations are retrived correctly.

Something different with Veeam v9?

Thanks,

Simon
xefil
Influencer
 
Posts: 20
Liked: never
Joined: Fri Jan 13, 2012 8:08 am

Re: Weekly Active Full Backup and Size

Veeam Logoby v.Eremin » Tue Jun 21, 2016 10:34 am

Use GetAllStorages() method instead:

Code: Select all
Get-VBRJob | select @{N="Job Name";E={$_.Name}}, @{N="Size";E={[math]::Round(((Get-VBRBackup -name ($_.Name)).GetStorages().Stats.BackupSize | Measure-Object -sum).Sum/1gb,1)}}, @{N="Full Backup Days";E={$_.BackupTargetOptions.FullBackupDays}}

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

Re: Weekly Active Full Backup and Size

Veeam Logoby xefil » Tue Jun 21, 2016 10:38 am

Thanks!

Simon
xefil
Influencer
 
Posts: 20
Liked: never
Joined: Fri Jan 13, 2012 8:08 am

Re: Weekly Active Full Backup and Size

Veeam Logoby v.Eremin » Tue Jun 21, 2016 11:50 am

You're welcome. Should other help be needed, don't hesitate to let us know. Thanks.
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 973 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Weekly Active Full Backup and Size

Veeam Logoby xefil » Tue Jun 21, 2016 12:48 pm

:wink: :wink: :wink:
xefil
Influencer
 
Posts: 20
Liked: never
Joined: Fri Jan 13, 2012 8:08 am


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 7 guests