PowerShell script exchange
Post Reply
makirkbride
Lurker
Posts: 2
Liked: 1 time
Joined: Jul 22, 2015 6:51 pm
Full Name: Mark Kirkbride
Contact:

Weekly Active Full Backup and Size

Post by makirkbride »

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.
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Weekly Active Full Backup and Size

Post by veremin »

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.
makirkbride
Lurker
Posts: 2
Liked: 1 time
Joined: Jul 22, 2015 6:51 pm
Full Name: Mark Kirkbride
Contact:

Re: Weekly Active Full Backup and Size

Post by makirkbride » 1 person likes this post

Excellent. Thank you.
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Weekly Active Full Backup and Size

Post by veremin »

Should other assistance with scripting be needed, feel free to contact us. Thanks.
kbay
Novice
Posts: 3
Liked: never
Joined: Feb 01, 2012 2:30 pm
Full Name: Kira
Contact:

Re: Weekly Active Full Backup and Size

Post by kbay »

Great script, thank you! does this provide the raw/non-deduped backup size?
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Weekly Active Full Backup and Size

Post by veremin »

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.
xefil
Enthusiast
Posts: 39
Liked: never
Joined: Jan 13, 2012 8:08 am
Contact:

Re: Weekly Active Full Backup and Size

Post by xefil »

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
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Weekly Active Full Backup and Size

Post by veremin »

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.
xefil
Enthusiast
Posts: 39
Liked: never
Joined: Jan 13, 2012 8:08 am
Contact:

Re: Weekly Active Full Backup and Size

Post by xefil »

Thanks!

Simon
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Weekly Active Full Backup and Size

Post by veremin »

You're welcome. Should other help be needed, don't hesitate to let us know. Thanks.
xefil
Enthusiast
Posts: 39
Liked: never
Joined: Jan 13, 2012 8:08 am
Contact:

Re: Weekly Active Full Backup and Size

Post by xefil »

:wink: :wink: :wink:
Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests