How determine if a copy job completed...

PowerShell script exchange

How determine if a copy job completed...

Veeam Logoby Dario.Palmisano » Tue Oct 13, 2015 10:18 am

Hello,

I wonder if someone can suggest me how I can determine with PowerShell if a copy backup job completed (eventually after having executed health check, compact full backup, etc.).

Till now I used to read key messages in the log produced by job, but many times it erroneously determine the job is completed when it is not!

Many thanks in advance for any hint!

Regards

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

Re: How determine if a copy job completed...

Veeam Logoby Shestakov » Tue Oct 13, 2015 11:54 am

Hello Dario,
Have you considered using job notifications?
Dario.Palmisano wrote:Till now I used to read key messages in the log produced by job, but many times it erroneously determine the job is completed when it is not!

Could you elaborate on that?
By the way, unlike backup job, backup copy one does not get "completed" since it works continuously and has 4 phases.
Thanks!
Shestakov
Veeam Software
 
Posts: 4861
Liked: 395 times
Joined: Wed May 21, 2014 11:03 am
Location: Saint Petersburg
Full Name: Nikita Shestakov

Re: How determine if a copy job completed...

Veeam Logoby Dario.Palmisano » Tue Oct 13, 2015 12:15 pm

Hello,

thanks for your answer.

Yes, you are right, but I created a script that enables the copy jobs after a backup is done and disables them after they have "completed" most of work.
I do this because I have many copy jobs and each holds some memory even when it is idle, but releases it when disabled.

As I said I monitor the log for understanding if a copy job completed most of the work. This seem to be failing sometime.

Most of the times (monitoring the log) I can successfully disable the job, but from time to time I get a warning status that I think is caused because I disabled the job before it completed some phase like health check or compact backup.

So I would like a way (if it exists) to understand if the copy job completed the work in this interval and will stay IDLE until the next.

I understand, I am possibly distorting the original logic behind the back copy job, but I need that in the environment I have

Thanks and regards

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

Re: How determine if a copy job completed...

Veeam Logoby Shestakov » Tue Oct 13, 2015 3:19 pm

I see your point.
You can use "Waiting for the new copy interval" event in the session log as a pointer.
Another suggestion is not to orient on the Idle state, since it doesn`t mean for sure that the copying process is done.
Thanks!
Shestakov
Veeam Software
 
Posts: 4861
Liked: 395 times
Joined: Wed May 21, 2014 11:03 am
Location: Saint Petersburg
Full Name: Nikita Shestakov

Re: How determine if a copy job completed...

Veeam Logoby Dario.Palmisano » Wed Oct 14, 2015 7:21 am

Thanks for your suggestion.

In my past testing I discovered that the following alternative pattern:

Waiting for the new copy interval*
Waiting for new restore points*

found in the log mean that the job "completed" (let me use this wrong term) and so it can successfully disabled, but from time to time I get a warning.

As I saw few answers (just yours, thanks) to my question I will try to find a way myself.

Best regards

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

Re: How determine if a copy job completed...

Veeam Logoby Shestakov » Wed Oct 14, 2015 10:05 am

What kind of warning did you get?
It may be not related to the time you disable the job.
Shestakov
Veeam Software
 
Posts: 4861
Liked: 395 times
Joined: Wed May 21, 2014 11:03 am
Location: Saint Petersburg
Full Name: Nikita Shestakov

Re: How determine if a copy job completed...

Veeam Logoby v.Eremin » Wed Oct 14, 2015 10:29 am

You said you get errors when you try to disable a backup copy job, while it's running health check or compact full operation. Don't those operation get reflected in the log? If they do, it's just matter of adding additional checks to the already existing script. Like, if "waiting" entities are present, check whether there are no "health check" and/or "compact full" taking place. In case of negative answer, disable the job.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 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