Help! How can execute jobs in sequence?

Availability for the Always-On Enterprise

Help! How can execute jobs in sequence?

Veeam Logoby Gio » Thu Oct 08, 2009 3:34 pm

Hi!
I've 7 backup job (one for each VM) scheduled during the night.
At the moment i've scheduled one job every hour, to avoid the overlay of jobs, but i've a lot of time lost because the backup duration is between 20 and 40 minutes.
Is it possible to concatenate the jobs so at the end of first automatically start the second and so on? In this way i don't have loss of time between one job and the next (now i've scheduled one job every hour but i've a lot of time lost).
Thanks,
Gio.
Gio
Novice
 
Posts: 4
Liked: never
Joined: Wed Oct 07, 2009 4:11 pm
Full Name: Gioachino

Re: Help! How can execute 7 job in sequence?

Veeam Logoby Vitaliy S. » Thu Oct 08, 2009 3:46 pm

Hello Gio,

Yes, you can easily do that. What you need to do, is go ahead and create (edit) a job, and on the last page of the configuration, where you click "finish", there is a window that populates the command line for that job.

Example:

Command line: C:\Program Files\Veeam\Backup and FastSCP\VeeamManager.exe" backup 421daae1-188e-4a1d-b7a4-d23a13af9fc9

You can use this for your scripting tasks (sequence) with the help of batch files (insert the line above to the batch file) and point to that batch file at the post backup job script box at advanced settings of your job's configurations, so your jobs could start one by one triggering each other by this way.

This is what relates to our current release, however in our upcoming release of Veeam Backup and Replicaton version 4, there is a integration with PowerShell, that will surely give you more options to play with.

Thank you.
Vitaliy S.
Veeam Software
 
Posts: 20088
Liked: 1157 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Help! How can execute 7 job in sequence?

Veeam Logoby Gostev » Thu Oct 08, 2009 6:17 pm

Alternatively, you can daisy chain all jobs using post-job script functionality under advanced job settings. Schedule the 1st job in chain to start on schedule, and disable scheduled starts for all other jobs. Every next jobs in the chain will be autostarted as a post-job activity from previous job. You should still use the same command line to start jobs as Vitaly mentioned in the previous post.
Gostev
Veeam Software
 
Posts: 21644
Liked: 2425 times
Joined: Sun Jan 01, 2006 1:01 am
Location: Baar, Switzerland

Re: Help! How can execute 7 job in sequence?

Veeam Logoby Gio » Fri Oct 09, 2009 7:09 am

Thanks for Reply!!!
I've already tried with batch file to run post-job script functionality but it doesn't run...
The job that i want to start with batch is called "Server03"; this is the batch:

Cd\Program Files\Veeam\Veeam Backup and FastSCP\
VeeamManager.exe backup Server03

The batch run without errors but the job don't start... what i'm mistaking?

Gio.
Gio
Novice
 
Posts: 4
Liked: never
Joined: Wed Oct 07, 2009 4:11 pm
Full Name: Gioachino

Re: Help! How can execute 7 job in sequence?

Veeam Logoby Gio » Fri Oct 09, 2009 7:48 am

Also using the command line:
"C:\Program Files\Veeam\Veeam Backup and FastSCP\VeeamManager.exe" backup Server03
doesn't run and and give no errors...
Gio
Novice
 
Posts: 4
Liked: never
Joined: Wed Oct 07, 2009 4:11 pm
Full Name: Gioachino

Re: Help! How can execute 7 job in sequence?

Veeam Logoby Vitaliy S. » Fri Oct 09, 2009 8:01 am

Hello Gio,

You need to actually copy the command from wizard step where you click "finish"? Instead of "Server03" there should be the job's ID, so it looks like this:

"C:\Program Files\Veeam\Backup and FastSCP\VeeamManager.exe" backup b3672123-3206-4a88-805f-7c3a50403ef5

This will make your job start using script, after you check that the script starts the job, please use this batch file as post backup job script.

Thank you.
Vitaliy S.
Veeam Software
 
Posts: 20088
Liked: 1157 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Help! How can execute 7 job in sequence?

Veeam Logoby Gio » Fri Oct 09, 2009 9:56 am

Sorry!
I wasn't able to find the Job's ID as You explain me and so i discover that probably 've used the wrong forum... I've Veeam Backup and Fast SCP.
I'll re-post the question in the "Veeam FastSCP forum"
Excuse me for the mistake...
Thanks to all,
Gio.
Gio
Novice
 
Posts: 4
Liked: never
Joined: Wed Oct 07, 2009 4:11 pm
Full Name: Gioachino

Re: Help! How can execute 7 job in sequence?

Veeam Logoby Vitaliy S. » Fri Oct 09, 2009 10:52 am

Hello Gio,

You're correct in choosing that forum, please have a look at the screenshot (i've sent you with private message) explaining where to get the command. If you still have any issues, please email us to support@veeam.com

Thank you
Vitaliy S.
Veeam Software
 
Posts: 20088
Liked: 1157 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Help! How can execute 7 job in sequence?

Veeam Logoby neo_italy » Tue Mar 30, 2010 4:40 pm

Hi,
i wanna serialize some jobs with a batch dos script and i want check the exit status of a job before starting the following.
What is the variable that i've to check? Perhaps %ERRORLEVEL%?

Thanks
neo_italy
Influencer
 
Posts: 13
Liked: never
Joined: Mon Nov 30, 2009 9:00 pm
Full Name: Luix

Re: Help! How can execute 7 job in sequence?

Veeam Logoby Gostev » Tue Mar 30, 2010 10:11 pm

Hello, here's the thread answering your question:
http://www.veeam.com/forums/viewtopic.php?f=2&t=2821&hilit=check+job+result

Thanks!
Gostev
Veeam Software
 
Posts: 21644
Liked: 2425 times
Joined: Sun Jan 01, 2006 1:01 am
Location: Baar, Switzerland

Re: Help! How can execute 7 job in sequence?

Veeam Logoby m.novelli » Thu Jan 27, 2011 1:50 pm 1 person likes this post

Nice thread, please consider as a feature request to add to Veeam GUI an option to easily concatenate and order backup jobs to run them serialized

Marco
m.novelli
Veeam ProPartner
 
Posts: 303
Liked: 36 times
Joined: Tue Dec 29, 2009 12:48 pm
Location: Asti - Italy
Full Name: Marco Novelli

Re: Help! How can execute 7 job in sequence?

Veeam Logoby RumataRus » Fri Feb 04, 2011 3:33 pm

Vitaliy S. wrote:Command line: C:\Program Files\Veeam\Backup and FastSCP\VeeamManager.exe" backup 421daae1-188e-4a1d-b7a4-d23a13af9fc9


Hi, Vitaliy!
Is "421daae1-188e-4a1d-b7a4-d23a13af9fc9" constant attribute of backup job?
It will be the same on any editing this backup job?
RumataRus
Enthusiast
 
Posts: 78
Liked: never
Joined: Mon Jun 21, 2010 5:30 am
Full Name: Dmitry Prokudin

Re: Help! How can execute 7 job in sequence?

Veeam Logoby Vitaliy S. » Fri Feb 04, 2011 5:19 pm

Yes, it is the same. No changes will be made to this ID after editing. Please note that you can also use PowerShell scripts to execute jobs in sequence.
Vitaliy S.
Veeam Software
 
Posts: 20088
Liked: 1157 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Help! How can execute 7 job in sequence?

Veeam Logoby davidkeis » Mon Feb 14, 2011 8:26 am

Hi. First post here... hope it's ok that I 'hijack' this thread :)

I am having the same problem as Gio described; Many backup jobs that I want to execute sequentially.

I could add each new job as a post-job command to the previous job, and just be happy with that. However, I need to also be able to execute the jobs I have individually, without triggering all the other jobs at the same time.
I realise that the problem could be solved by adding duplicates of all the jobs at hand, so i'd have 2 backup jobs for each VM (one for scheduled backup and one for manual backup). That seems like a not-very-elegant solution.

I have tried creating a .bat script to trigger the jobs one after another, but I have not yet found a way to make the .bat script wait for the current job to finish, before starting the next job.

Is there a way to achieve the above?
davidkeis
Influencer
 
Posts: 10
Liked: never
Joined: Mon Feb 14, 2011 8:09 am
Full Name: David Keis

Re: Help! How can execute 7 job in sequence?

Veeam Logoby Vitaliy S. » Mon Feb 14, 2011 12:49 pm

Hello David,

Yes, there is another way.

You need to use PowerShell script that checks current status of the backup job, and then based on the output triggers other jobs.
Should more details be required, please take a look at these links:
Post Script in Backup
Veeam Backup v4 wait command (nevermind the title)

Hope it helps!
Vitaliy S.
Veeam Software
 
Posts: 20088
Liked: 1157 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Next

Return to Veeam Backup & Replication



Who is online

Users browsing this forum: Google [Bot], Songykhw and 1 guest