Backup copy job instantanous state

PowerShell script exchange

Backup copy job instantanous state

Veeam Logoby Dario.Palmisano » Wed Mar 18, 2015 12:13 pm

Hello Everybody,

I am trying to track the state evolution of a backup copy job.

Is it possible to access the evolution of it, getting the lines like the following ones (showed in the "Action" Window)?

Many thanks and regards

Dario


New copy interval started
Building VM list
...
Changed block tracking is enabled
...
Full backup file merge completed successfully
Waiting for the new copy interval
Dario.Palmisano
Enthusiast
 
Posts: 29
Liked: 2 times
Joined: Mon Nov 11, 2013 7:22 am
Full Name: Dario Palmisano

Re: Backup copy job instantanous state

Veeam Logoby nefes » Wed Mar 18, 2015 12:58 pm

You can do it by getting your job session and calling Logger in it. Some sample out of the head, please check if it works:

Code: Select all
(Get-VBRJob -name "Name").FindLastSession().logger.getlog().updatedrecords.title
nefes
Veeam Software
 
Posts: 534
Liked: 125 times
Joined: Mon Dec 10, 2012 8:44 am
Full Name: Nikita Efes

Re: Backup copy job instantanous state

Veeam Logoby Dario.Palmisano » Thu Mar 19, 2015 12:29 pm

Thanks for you suggestion,

I tried it and if I use the whole expression you provided I get nothing, if instead I use:

(Get-VBRJob -name "Name").FindLastSession().logger.getlog().updatedrecords

I get the complete log, below reported. Is there any way to parse it?

Status : ENone
OrdinalId : 4
UpdateUsn : 5
Title : Waiting for new restore points
Description :
UpdateTime : 3/19/2015 1:19:29 PM
Style : ENone
Object :
StartTime : 3/19/2015 1:19:29 PM
Cookie :

Status : ESucceeded
OrdinalId : 3
UpdateUsn : 4
Title : Building VM list
Description :
UpdateTime : 3/19/2015 1:19:29 PM
Style : ENone
Object :
StartTime : 3/19/2015 1:18:56 PM
Cookie :

Status : ESucceeded
OrdinalId : 2
UpdateUsn : 2
Title : New copy interval started
Description :
UpdateTime : 3/19/2015 1:18:55 PM
Style : ENone
Object :
StartTime : 3/19/2015 1:18:55 PM
Cookie :

Status : ESucceeded
OrdinalId : 1
UpdateUsn : 1
Title : Job started at 3/19/2015 1:18:33 PM
Description :
UpdateTime : 3/19/2015 1:18:34 PM
Style : ENone
Object :
StartTime : 3/19/2015 1:18:34 PM
Cookie :
Dario.Palmisano
Enthusiast
 
Posts: 29
Liked: 2 times
Joined: Mon Nov 11, 2013 7:22 am
Full Name: Dario Palmisano

Re: Backup copy job instantanous state

Veeam Logoby v.Eremin » Thu Mar 19, 2015 2:22 pm

Not sure what might be wrong with the script provided by Nikita, as it runs correctly in my environment.

Title is a parameter that should be outputted. If the referenced example doesn't work for you, what if you write something like this:

Code: Select all
(Get-VBRJob -name "Name of your backup copy job").FindLastSession().logger.getlog().updatedrecords | select-object {$_.title}


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

Re: Backup copy job instantanous state

Veeam Logoby Dario.Palmisano » Fri Mar 20, 2015 11:12 am

That works! Thanks!

But now it is the second time, that solutions provided by knowledgeable "Veem software" people works for their environment, but not on mine, so yesterday I open a case (# 00844975), but the support says to refer to forum for suggestions about scripting.

What environment are you using? I have the latest version 8.0.0.917.

Maybe during the update from the version 7 something went wrong, or maybe something need to be done to update the powershell,

Running $PSVersionTable.PSVersion I get:

Major Minor Build Revision
----- ----- ----- --------
2 0 -1 -1

Please advise,

Thanks in advance
Dario.Palmisano
Enthusiast
 
Posts: 29
Liked: 2 times
Joined: Mon Nov 11, 2013 7:22 am
Full Name: Dario Palmisano

Re: Backup copy job instantanous state

Veeam Logoby v.Eremin » Fri Mar 20, 2015 11:36 am

What environment are you using?

Windows 2012 R2 with PowerShell 4.0 on board. Based on the provided information, you appear to be using PowerShell version 2.0. I've seen number of cases where some parameters and methods were missing when an outdated Powershell version was used. So, it's certainly worth updating to the latest available version of PS.

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

Re: Backup copy job instantanous state

Veeam Logoby Dario.Palmisano » Fri Mar 20, 2015 1:33 pm 1 person likes this post

Just to confirm that updating to PowerShell 4.0, solved the problem.

Many thanks to everybody!
Dario.Palmisano
Enthusiast
 
Posts: 29
Liked: 2 times
Joined: Mon Nov 11, 2013 7:22 am
Full Name: Dario Palmisano

Re: Backup copy job instantanous state

Veeam Logoby v.Eremin » Fri Mar 20, 2015 1:57 pm

Glad to hear that you're up and running now. Should other help be needed, don't hesitate to let us know.
v.Eremin
Veeam Software
 
Posts: 13285
Liked: 971 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 5 guests