In my runcopy.sh script I put a 'sleep 30' delay in at the beginning to give the backup job a chance to completely finish. This is a somewhat arbitrary choice and may not be enough for long jobs. Is there a way to have the script check for completion prior to running the copy job or is that not necessary?
I set the priorities of both backup and copy jobs = 10 as you suggested. -Chris- On Thu, 14 Nov 2024, 18:54 Bill Arlofski, <w...@protonmail.com> wrote: > On 11/14/24 9:28 AM, Chris Wilkinson wrote: > > > > That's great, thanks Bill. It seems I had the correct answer but didn't > know how to use it correctly. The level thing threw > > me off completely. > > Ahh! Good to hear that my "book" about copy jobs was helpful. I have a > habit of writing long-winded answers.😆 > > > > My plan is to run the copy job immediately after the backup in a run > script > > > > runcopy.sh %n %p > > > > with some text substitutions within to change <job>-backup to <job>-copy > > Make sure that your Copy Control job has the same priority as the Backup > job(s) that call it, or you will end up in a chicken > and egg situation where the Backup Job is waiting to the Copy control job > to finish, but the Copy control job is waiting for > the Backup job to finish before it starts. :) > > Also, have a look at `MaximumConcurrentJobs` in the Copy Control job, and > the Backup jobs being copied. > > When a Copy control job triggers a copy, two jobs are started: Another > Copy control job to manage the Copying of one backup > job, and a "backup" job representing the new copy job. So, you will need > to increase the MaximumConcurrentJobs setting for each. > > Also, there is a limiting setting in a Copy control job called > `MaximumSpawnedJobs`. > > If your Copy control job, using `PoolUncopiedJobs` finds 1,000 backup jobs > in a pool that have not been copied yet, by > default it will spawn 999 new copy control jobs, and take that last jobid > and Copy it itself. > > You might not want this to be unlimited, especially when you first start > using Copy jobs on Pools that have existed for a > while and may have a lot of jobs in them. :) Later, once everything is > "all caught up", this setting may be left alone, or > removed since there should only ever be a few Backup jobs each day that > need to be copied. > > > One other note: Since you are planning to trigger the Copy control job > from the Backup job(s) when they are finished, you can > specify the Backup jobid on the command line that calls your script using > `%i`. > > Then, in your `runcopy.sh` script when you issue the `run job=CopyJobName` > command, you can add `jobid=xxxx` and the > `PoolUncopiedJobs` setting is ignored and Bacula will only copy this one > specific JobId. > > Hope this helps! > > > > Thanks > > Welcome! > > > Best regards, > Bill > > -- > Bill Arlofski > w...@protonmail.com >
_______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users