On 2020-04-06 09:41, Richard Laysell wrote:
> 
> Hello,
> 
> I would like to run a copy job immediately after a set of disk backups
> has completed, but this seems to not work as I expect.
> 
> I am scheduling the jobs as follows
> 
> Client1 - Disk backup - Priority 10
> Client2 - Disk backup - Priority 10
> Client3 - Disk backup - Priority 10
> Client4 - Disk backup - Priority 10
> Client5 - Disk backup - Priority 10
> and so on for other clients
> All of these jobs will run in parallel (up to the concurrency limit)
> 
> Copy Job - Disk to Tape - Priority 20 - Pool Uncopied Jobs.
> This job should backup all of the just completed disk backups to a tape
> which goes offsite.  This gives both onsite and offsite copies.
> 
> When I try to implement this, the disk backups all complete
> successfully, but the copy job does not copy anything to tape.  After
> analysing this I think it is because the copy job looks for jobs to
> copy as soon as it starts.  This means that if it is started at the
> same time or while any of the disk jobs are running it will copy only
> the completed ones even thought it does not actually run until all of
> the disk backups have completed (because it has a lower priority)

I am familiar with this problem.  The root cause of the problem is that
the list of jobs for a copy job to copy is evaluated when it is
scheduled to run, not when it actually becomes runnable and begins
executing.  This means that by the time the job actually runs, it may be
running based upon stale data, as you have discovered.


> I could schedule the copy job to start an hour after I expect the
> latest disk backup to finish but this means that the backups do not
> complete as early as possible.

This is the only practical workaround that I have so far found.

> Is it possible to do one of the following:
> 1. Delay the selection of jobs for the copy job until it actually runs
>    rather than do the selection when it initially starts

There has been some discussion of exactly this, which would actually
make copy jobs more consistent with the behavior of other job types as
well as being more behaviorally correct.

> 2. Have a job (priority 20) which starts the copy job.  This would then
>    start the copy job only when all of the disk backups are complete.

If you come up with a clean and practical way to do this, I'd be
interested to see it.




-- 
  Phil Stracchino
  Babylon Communications
  ph...@caerllewys.net
  p...@co.ordinate.org
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to