Monthly report on Active Fulls

PowerShell script exchange

Monthly report on Active Fulls

Veeam Logoby extremesanity » Tue Sep 30, 2014 9:55 pm

I would like to verify via report that my Active Fulls are running every month.

I can run something like this and add additional constraints to get what I want, but all it returns is Type = "Full". How can I tell when a restore point is an Active Full and not a Synthetic Full?

Get-VBRRestorePoint -backup testjob1 -name test22 | Where {$_.type -eq "Full"}
extremesanity
Influencer
 
Posts: 14
Liked: 6 times
Joined: Thu Jul 31, 2014 3:47 pm
Full Name: Lucas

Re: Monthly report on Active Fulls

Veeam Logoby v.Eremin » Wed Oct 01, 2014 10:05 am

There is a script that checks whether the last job session was synthetic full backup. You can take this approach as an example and propagate it further. Find monthly worth session, checks whether it was a full backup one, and verify whether or not the "Synthetic" string is there. Thanks.
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 974 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Monthly report on Active Fulls

Veeam Logoby extremesanity » Wed Oct 01, 2014 9:41 pm

So I guess what is confusing me is how I grab the last month worth of sessions so I can loop through them and check if the log contains or doesn't contain certain text.

It appears the built in functions only account for grabbing the last session?
extremesanity
Influencer
 
Posts: 14
Liked: 6 times
Joined: Thu Jul 31, 2014 3:47 pm
Full Name: Lucas

Re: Monthly report on Active Fulls

Veeam Logoby v.Eremin » Thu Oct 02, 2014 8:33 am

You can use the following script in order to grad 1 month old full backup sessions:

Code: Select all
$1MonthOld = (Get-Date).AddMonths(-1)
$Sessions = Get-VBRBackupSession | where {($_.Jobname -eq "Backup Job 1") -and ($_.CreationTime.date -eq $1MonthOld.Date) -and ($_.IsFullMode -eq $True)}

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

Re: Monthly report on Active Fulls

Veeam Logoby extremesanity » Thu Oct 02, 2014 8:20 pm

That is what I need thank you.

For others reference, IsFullMode = True will only pull Active Fulls and not Synthetic Fulls (as I wanted). You can verify this manually by checking the history. An Active Full session will have (full) next to the session name, and will NOT have any reference to "full" in the backup session log. A Synthetic Full will NOT have (full) in the session name and WILL have "synthetic full" in the backup session log.

What I ended up with:

Code: Select all
$1MonthOld = (Get-Date).AddMonths(-1)
$today = (Get-Date)
$results = Get-VBRBackupSession | where {($_.Jobname -eq "jobname") -and ($_.CreationTime.date -ge $1MonthOld.Date) -and ($_CreationTime.date -le $today) -and ($_.IsFullMode -eq $True)}
write-output $results
extremesanity
Influencer
 
Posts: 14
Liked: 6 times
Joined: Thu Jul 31, 2014 3:47 pm
Full Name: Lucas

Re: Monthly report on Active Fulls

Veeam Logoby v.Eremin » Fri Oct 03, 2014 8:55 am

Glad to hear my input was helpful. Feel free to reach us, if other questions arise. Thanks.
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 974 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 3 guests