-
- Novice
- Posts: 9
- Liked: never
- Joined: Mar 16, 2012 9:49 am
- Contact:
Veeam B&R 6.5 jobs chain
With Veeam B&R 6.5 there is a new nice feature that allows to concatenate jobs.
So it is possible to build a chain of jobs like:
Start Job1 ----> End Job1 -> Start Job2 ----> End Job2 -> Start Job3 ----> End Job3 -> ...
It is possible, but I think not, to have an option that will start Job2 at a specific time if Job1 takes too much time ?
So I can have the power of chained jobs and the sure that a job will, at least, start at a specific time.
Suggestions:
1) If in the chain I disable Job2: Job3 never starts. A warning may be useful.
2) If the I change the job schedule to run at a specific time and there is a backup-window that will deny execution in that moment, it will be nice to have a warning.
Daniele
--
So it is possible to build a chain of jobs like:
Start Job1 ----> End Job1 -> Start Job2 ----> End Job2 -> Start Job3 ----> End Job3 -> ...
It is possible, but I think not, to have an option that will start Job2 at a specific time if Job1 takes too much time ?
So I can have the power of chained jobs and the sure that a job will, at least, start at a specific time.
Suggestions:
1) If in the chain I disable Job2: Job3 never starts. A warning may be useful.
2) If the I change the job schedule to run at a specific time and there is a backup-window that will deny execution in that moment, it will be nice to have a warning.
Daniele
--
-
- Product Manager
- Posts: 20286
- Liked: 2258 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Veeam B&R 6.5 jobs chain
In order to meet your expectations I can propose you workaround, which includes putting into use “backup window” , as well as, “terminate” functionality.danielec wrote: It is possible, but I think not, to have an option that will start Job2 at a specific time if Job1 takes too much time ?
So I can have the power of chained jobs and the sure that a job will, at least, start at a specific time.
Specify the “backup window” in Job1 Schedule Settings, enabling “terminate job if it exceeds backup-window”. Thus, job will be running for set period and will be terminated immediately, when it exceeds backup-window, or ,in other words, when job1 takes too much time.
Thereby ,job2 ,which was scheduled to run after the first one, will start in given time, making the allowance for amount of time required for job terminating.
Hope this helps.
Thanks.
-
- VP, Product Management
- Posts: 6016
- Liked: 2844 times
- Joined: Jun 05, 2009 12:57 pm
- Full Name: Tom Sightler
- Contact:
Re: Veeam B&R 6.5 jobs chain
I'm confused by what your goal is for job chaining. You want the job to "wait" but then run after a given time anyway, so why not just schedule the job to start later and forget job chaining and the complexity and issues that it brings?
-
- Veteran
- Posts: 391
- Liked: 32 times
- Joined: Jul 18, 2011 9:30 am
- Full Name: Hussain Al Sayed
- Location: Bahrain
- Contact:
Re: Veeam B&R 6.5 jobs chain
@danielec I agree with @Tom what he suggested, to start the job as per your convenience by using a Post-Activity scripts that will start the jobs by specifying a time.
Job1 takes 1 hour full backup, but you have a resources to run Job2 in some occasions Job1 might takes longer than earlier when it runs and if you run Job2 during Job1 and Job3 so in total will have 3 jobs running at the same time Job1, Job2 and Job3..
PowerShell scripts with Schedule Tasks is your ideal solution. Schedule them for your Daily as Incremental and Weekly as Full Backup it depends on when you run your Active Full Backup or Synthetic Backup that also depends on the job configuration within Veeam.
Job1 takes 1 hour full backup, but you have a resources to run Job2 in some occasions Job1 might takes longer than earlier when it runs and if you run Job2 during Job1 and Job3 so in total will have 3 jobs running at the same time Job1, Job2 and Job3..
PowerShell scripts with Schedule Tasks is your ideal solution. Schedule them for your Daily as Incremental and Weekly as Full Backup it depends on when you run your Active Full Backup or Synthetic Backup that also depends on the job configuration within Veeam.
Code: Select all
Add-PSSnapin VeeamPSSnapin
# Add the name of the backup jobs to be included here. The order in which they are entered is the order in which they will run
$chainedjobs = ("Job1"), ("Job2"), ("Job3") #Or each Job in specific script that will run via Schedule Task for Weekly Full Backup and Daily Incremental.
foreach ($jobname in $chainedjobs){
$job = Get-VBRJob -name $jobname
$jobtry = 0
start-VBRJob -job $job
$job.GetLastResult()
if($job.GetLastResult() -eq "Failed"){
do{
Start-Sleep 480
Start-VBRJob -job $job -RetryBackup
$jobtry++
}
while(($jobtry -lt 3) -and ($job.GetLastResult() -eq "Failed"))
}
}
-
- Novice
- Posts: 9
- Liked: never
- Joined: Mar 16, 2012 9:49 am
- Contact:
Re: Veeam B&R 6.5 jobs chain
I agree with you, but with chained-jobs you don't want to waste time (veeam idle... sleeping).tsightler wrote:I'm confused by what your goal is for job chaining. You want the job to "wait" but then run after a given time anyway, so why not just schedule the job to start later and forget job chaining and the complexity and issues that it brings?
Thanks. But I don't understand how can you meet what I want with your PowerShell Script. You Start the 3 jobs sequentialy (jobs chain).habibalby wrote: PowerShell scripts with Schedule Tasks is your ideal solution. Schedule them for your Daily as Incremental and Weekly as Full Backup it depends on when you run your Active Full Backup or Synthetic Backup that also depends on the job configuration within Veeam.
If job1 will takes too much time you will have to wait until is finished.
Using powershell it will possible to (pseudocode):
Code: Select all
# Execute this script from Schedule Tasks (Windows)
# Set Job schedule time so veeam can schedule and start the jobs for us
job1 start at 00:00
job2 start at 01:00
job3 start at 02:00
# Chain Jobs run (bypass veeam schedule)
For Each job: job1, job2, job3; do
{
# Disable schdule since we run the job manually
job disable schedule
# Check if the job is not running (veeam may have start it) if so start it
if (job is not Running) {
start job
}
}
Daniele
--
-
- Veteran
- Posts: 391
- Liked: 32 times
- Joined: Jul 18, 2011 9:30 am
- Full Name: Hussain Al Sayed
- Location: Bahrain
- Contact:
Re: Veeam B&R 6.5 jobs chain
Hi,
You can set one job per script and configure an average time cap between each job.
Thanks,
You can set one job per script and configure an average time cap between each job.
Thanks,
-
- Product Manager
- Posts: 20286
- Liked: 2258 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Veeam B&R 6.5 jobs chain
If PowerShell solution doesn’t answer your requirements, why not to try to solve this issue via GUI,as i've mentioned previously,using “backup-window” in conjunction with “terminate if the job exceeds it”?
In this specific example, if job1 ends in time, job2 starts immediately after it. Otherwise, if job1 exceeds back up window, it will be terminated, and job2 will be started approximately in specific time (the time when backup window ends), taking into account some amount of time necessary for terminating.
Thanks.
In this specific example, if job1 ends in time, job2 starts immediately after it. Otherwise, if job1 exceeds back up window, it will be terminated, and job2 will be started approximately in specific time (the time when backup window ends), taking into account some amount of time necessary for terminating.
Thanks.
-
- Veteran
- Posts: 391
- Liked: 32 times
- Joined: Jul 18, 2011 9:30 am
- Full Name: Hussain Al Sayed
- Location: Bahrain
- Contact:
Re: Veeam B&R 6.5 jobs chain
Does this help you out? http://s11.postimage.org/fjgu0eqpd/Veeam_Schedule.jpgdanielec wrote: Thanks. But I don't understand how can you meet what I want with your PowerShell Script. You Start the 3 jobs sequentialy (jobs chain).
If job1 will takes too much time you will have to wait until is finished.
-
- Novice
- Posts: 9
- Liked: never
- Joined: Mar 16, 2012 9:49 am
- Contact:
Re: Veeam B&R 6.5 jobs chain
This is simple and correct. The only disadvance is that you have to stop/abort Job1 to start Job2 (the "backup-windows" will kill Job1)v.Eremin wrote:If PowerShell solution doesn’t answer your requirements, why not to try to solve this issue via GUI,as i've mentioned previously,using “backup-window” in conjunction with “terminate if the job exceeds it”?
Okey, you have different Windows Tasks that will run several Veeam PowerShell Script.habibalby wrote: Does this help you out?
Each script will execute a jobs-chain of backup/replica.
But in your script, as I said before, you will execute in sequence: job1 -> job2 -> job3
If Job1 will takes a lot of time you have to wait it to finish before job2 can run...
Thanks!
-
- Veteran
- Posts: 391
- Liked: 32 times
- Joined: Jul 18, 2011 9:30 am
- Full Name: Hussain Al Sayed
- Location: Bahrain
- Contact:
Re: Veeam B&R 6.5 jobs chain
Hello, you can change the script instead of multible jobs you can put 1 job per script and that's what I'm doing.
-
- Novice
- Posts: 9
- Liked: never
- Joined: Mar 16, 2012 9:49 am
- Contact:
Re: Veeam B&R 6.5 jobs chain
Of course, but the topic is about jobs chainhabibalby wrote:Hello, you can change the script instead of multible jobs you can put 1 job per script and that's what I'm doing.
-
- Veteran
- Posts: 391
- Liked: 32 times
- Joined: Jul 18, 2011 9:30 am
- Full Name: Hussain Al Sayed
- Location: Bahrain
- Contact:
Re: Veeam B&R 6.5 jobs chain
There always a workaround when things are not available by default of them is the separate full active baxkup schedule which is a nice to have but since its not available Task schudler is the replacement.
-
- VP, Product Management
- Posts: 6016
- Liked: 2844 times
- Joined: Jun 05, 2009 12:57 pm
- Full Name: Tom Sightler
- Contact:
Re: Veeam B&R 6.5 jobs chain
But this is what I don't understand. If you "don't want to waste time" then why not just start both jobs at the same time and let them run. That would "waste" even less time. I'm having a very difficult time understanding the logic of running only 1 job at a time, unless a job runs "too long" and then running a two at a time. If you have the resources to run two at a time, just do it. This is what Veeam, and it's automatic load balancing is designed to do. Don't waste time, don't waste resources, just start the job and let them run using the resources (i.e. proxies) that you have available. This will get the jobs done in the fastest time no matter what, not job chaining required.danielec wrote: I agree with you, but with chained-jobs you don't want to waste time (veeam idle... sleeping).
So, I'd like to understand your reason for not wanting to just run both jobs concurrently from the start, but then being OK with running two jobs later. Note that I'm not saying there's not a good reason, only that I don't understand what it might be, and I can't really see adding all of this complication to the product for such a unique use case.
If I were attempting to meet this goal, I'd try to figure out the way to do this in the simplest possible method. I'm thinking that perhaps manipulating the availability of proxies is the easiest way to do that without chaining.
-
- Novice
- Posts: 9
- Liked: never
- Joined: Mar 16, 2012 9:49 am
- Contact:
Re: Veeam B&R 6.5 jobs chain
Resource is the problem (destination target and proxy). So what I want is to run 1 job as fast as possible with all the resource for him. After the backup job I want to run the replica of the VM. So chained jobs are good. You don't need to know when to schedule all jobs, but just the first.tsightler wrote: But this is what I don't understand. If you "don't want to waste time" then why not just start both jobs at the same time and let them run. That would "waste" even less time. I'm having a very difficult time understanding the logic of running only 1 job at a time, unless a job runs "too long" and then running a two at a time. If you have the resources to run two at a time, just do it.
Real Example:
I hade a situation where a backup of a VM was slow, because someone made a snapshot... In this situation, if the VM with the snapshot that you wanto to bck is the first job in the sequence, you are unlucky ...
-
- VP, Product Management
- Posts: 6016
- Liked: 2844 times
- Joined: Jun 05, 2009 12:57 pm
- Full Name: Tom Sightler
- Contact:
Re: Veeam B&R 6.5 jobs chain
Sounds like you could easily handle this by simply setting the number of concurrent threads supported by both your proxy and repository.danielec wrote: Resource is the problem (destination target and proxy). So what I want is to run 1 job as fast as possible with all the resource for him. After the backup job I want to run the replica of the VM. So chained jobs are good. You don't need to know when to schedule all jobs, but just the first.
-
- VeeaMVP
- Posts: 6143
- Liked: 1935 times
- Joined: Jul 26, 2009 3:39 pm
- Full Name: Luca Dell'Oca
- Location: Varese, Italy
- Contact:
Re: Veeam B&R 6.5 jobs chain
This easy to solve using Tom's advice, and it's the same I did at some customers: allow a proxy to run two cuncurrent jobs, and if a VM get stuck in committing a snapshot, the other pipe will run another job meanwhile.danielec wrote: Real Example:
I hade a situation where a backup of a VM was slow, because someone made a snapshot... In this situation, if the VM with the snapshot that you wanto to bck is the first job in the sequence, you are unlucky ...
You can also limit the load on the repository, to avoid congestion on it.
Luca.
Luca Dell'Oca
Principal EMEA Cloud Architect @ Veeam Software
@dellock6
https://www.virtualtothecore.com/
vExpert 2011 -> 2022
Veeam VMCE #1
Principal EMEA Cloud Architect @ Veeam Software
@dellock6
https://www.virtualtothecore.com/
vExpert 2011 -> 2022
Veeam VMCE #1
Who is online
Users browsing this forum: csneed, dbeerts, PhilDar and 110 guests