PowerShell script exchange
Post Reply
npitacco
Influencer
Posts: 18
Liked: never
Joined: Jan 12, 2010 3:33 pm
Full Name: Nadia Pitacco
Contact:

Get-VBRTapeJob and last run time

Post by npitacco »

Hello everyone.
I am writing some scripts to summarize the results of the jobs run in the last 24 hours for Veeam 7 (I know, I should upgrade)
I have no problem with standard backup jobs, but tape jobs are giving me weird results.
Dates do not match the one shown in the graphical interface, LatestRun is two years in the past and EndDateTime is next week :-(
When I look in the graphical interface I have:

Code: Select all

Job Name: File to Tape Job
Session type: FileTapebackup
Status: Success
Start Time: 6/21/2015 1:00 AM
End Time: 6/21/2015 10:17 AM
and this is the result of "Get-VBRJobScheduleOptions -Job "File to Tape Job" (I have shortened the schedule strings because I dont't believe they are relevant)

Code: Select all

OptionsScheduleAfterJob           : Veeam.Backup.Model.CScheduleAfterJobOptions
StartDateTime                          : 11/2/2013 4:51:01 PM
EndDateTimeSpecified              : False
EndDateTime                       : 6/26/2015 11:29:19 AM
RepeatSpecified                   : False
RepeatNumber                      : 1
RepeatTimeUnit                    : hour(s)
RepeatTimeUnitMs                  : 3600000
RetryTimes                        : 3
RetryTimeout                      : 10
RetrySpecified                    : True
WaitForBackupCompletion           : True
BackupCompetitionWaitingPeriodMin : 180
OptionsDaily                      : Enabled: True, DayNumberInMonth: Everyday, Days: Monday, Tuesday, Wednesday, Thursd
                                    ay, Friday, Saturday, Sunday
OptionsMonthly                    : Enabled: False, Time: 11/2/2013 10:00:00 PM, Day Number In Month: Fourth, Day Of We
                                    ek: Saturday, Months: January, February, March, April, May, June, July, August, Sep
                                    tember, October, November, December
OptionsPeriodically               : Enabled: False, Period: 1 hour(s), ScheduleString: <scheduler>...</scheduler>, HourlyOffset: 0
OptionsContinuous                 : Enabled: False, ScheduleString: <scheduler>...</scheduler>
OptionsBackupWindow               : Veeam.Backup.Model.CBackupWindowOptions
NextRun                           : 06/24/2015 20:00:00
LatestRun                         : [b]11/2/2013 4:46:01 PM[/b]
LatestRecheck                     : 1/1/0001 12:00:00 AM
The date "11/2/2013 4:51:01 PM" is when the job was created
My problem is the LatestRun value which is wrong.
Is this a known bug (but I have not seen it mentioned anywhere) or am I missing something?

Thanks in advance
Nadia
veremin
Product Manager
Posts: 20400
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Get-VBRTapeJob and last run time

Post by veremin »

What happens if you try to get it differently?

Code: Select all

$TapeJob = Get-VBRTapeJob -Name "Name of your tape job"
Get-VBRSession -Job $TapeJob -Last | select {$_.endtime}
Thanks.
npitacco
Influencer
Posts: 18
Liked: never
Joined: Jan 12, 2010 3:33 pm
Full Name: Nadia Pitacco
Contact:

Re: Get-VBRTapeJob and last run time

Post by npitacco »

I apologize for the very late feedback, but I didn't receive the notification of your post.
I have tried the solution you suggested and it works.
I don't understand why, and this trouble me because without knowing the reason I cannot avoid other similar problems.

Thank you very much for pointing me to the right solution

Nadia
veremin
Product Manager
Posts: 20400
Liked: 2298 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Get-VBRTapeJob and last run time

Post by veremin »

Tape functionality has different set of its own commandlets. For instance, Get-VBRsession returns list of tape job sessions, thus, it should be used to get proper information regarding tape job last run. Other generic commandlets might or might not work for tape jobs smoothly.

This section of our help center might be a good starting point.

Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests