On 2023-01-17 17:45, Bill Arlofski via Bacula-users wrote:
On 1/17/23 06:05, Ivan Villalba via Bacula-users wrote:
How can I run two differnet copy job that copies the same jobid with
the PoolUncopiedJobs ?
You can't.
The PoolUncopiedJobs does exactly what its name suggests: It copies
jobs in a pool that have not been copied to some other pool.
If you want to copy the same backup jobs to more than one other pool,
you will need to use `Selection type = SQLQuery` and
then use an appropriate SQL query for the `SelectionPattern` to
generate a list of JobIds to run the second set of copies.
I am using PoolUncopiedJobs with a RunAfterJob which executes a script
when the job successfully finishes. The script inserts the job ID of
a copied job into a table created specifically for that purpose.
The original job ID can be passed to a shell script using "%I".
This requires additional admin job that starts jobs that will perform
a copy using the list of job IDs from the table.
Those copy jobs also use RunAfterJob calling a shell script that
removes a job ID from the table in case the copy job finished
successfully.
That way it is possible to copy jobs as many time as needed.
It is possible to use different pools which is useful in case one
need to maintain several pools which contain all the jobs stored on
different media which also rotate several times per week.
I like the level of flexibility Bacula offers.
It is worth mentioning that copy job builds a list of jobs that
need to be copied at the time of job execution.
Regards
--
Josip Deanovic
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users