Availability for the Always-On Enterprise
Gio
Novice
Posts: 4
Liked: never
Joined: Oct 07, 2009 4:11 pm
Full Name: Gioachino
Contact:

Help! How can execute jobs in sequence?

Post by Gio » 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.

Vitaliy S.
Veeam Software
Posts: 21398
Liked: 1273 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

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

Post by Vitaliy S. » 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.

Gostev
Veeam Software
Posts: 22808
Liked: 2801 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

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

Post by Gostev » 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.

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

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

Post by Gio » 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: Oct 07, 2009 4:11 pm
Full Name: Gioachino
Contact:

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

Post by Gio » 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...

Vitaliy S.
Veeam Software
Posts: 21398
Liked: 1273 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

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

Post by Vitaliy S. » 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.

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

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

Post by Gio » 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.

Vitaliy S.
Veeam Software
Posts: 21398
Liked: 1273 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

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

Post by Vitaliy S. » 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

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

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

Post by neo_italy » 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

Gostev
Veeam Software
Posts: 22808
Liked: 2801 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

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

Post by Gostev » Mar 30, 2010 10:11 pm

Hello, here's the thread answering your question:
http://www.veeam.com/forums/viewtopic.p ... job+result

Thanks!

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

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

Post by m.novelli » 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

RumataRus
Enthusiast
Posts: 78
Liked: never
Joined: Jun 21, 2010 5:30 am
Full Name: Dmitry Prokudin
Contact:

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

Post by RumataRus » 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?

Vitaliy S.
Veeam Software
Posts: 21398
Liked: 1273 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

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

Post by Vitaliy S. » 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.

davidkeis
Influencer
Posts: 10
Liked: never
Joined: Feb 14, 2011 8:09 am
Full Name: David Keis
Contact:

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

Post by davidkeis » 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?

Vitaliy S.
Veeam Software
Posts: 21398
Liked: 1273 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

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

Post by Vitaliy S. » 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!

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests