Bacula, run scripts after backup?

IT & Software | Other
We use Bacula for backup, after a backup on the client, Bacula runs a script that additionally presses the required data with a tar.

In the director’s settings in the job for the client, it looks like this:
Run Script {
      Runs When=After
      Runs On Client=yes
      Runs On Success=yes
      Runs On Failure=no
      Fail Job On Error=no
      Command="sh /home/test2.sh"

Everything is great, the script runs after backup, but bacula does not consider the task completed until the script runs to the end, and this can take a long time, which is why I can create unnecessary queues in the director...

Tried to get around this with the standard Bashiv ampersand(&):
Command="sh /home/test2.sh&"

Nothing comes out, even tried to launch another script with an ampersand from the script, anyway bacula considers the task not completed until the script is finished...Oo

Of course, there are thoughts to create a script that launches a bakul, any file in tmp, and to check for the presence of this file using a crown script and run tar, but you don’t want to fence such crutches.There must be a way out!

Tell me, who faced with Bacula, how to solve this problem?
No attachments
Bacula is waiting for the completion of all child processes.In other words, you “in the background” will not leave the task, if your processes run from the bakula - even if you make a fork in the script and kill the parent, the orphan will pick up the bakula and wait for its completion.It is logical, because the serialization of tasks in the bakul is done to speed up each of them: so that the systems “do not get dispersed” while executing, performing each of the tasks and everything in general is faster.

You can partially work around this by specifying Maximum Concurrent Jobs greater than 1 in the Client, Storage, Director resources(where necessary).Then the system will be able to start other tasks, despite the fact that this task is still being completed.
Perhaps another solution is to deploy a backup from a bakula just made and pack it into a tar already.If memory is not lying now, restore jobs will work differently with these restrictions on the number of simultaneous tasks.

In general, I have a strong feeling that you are using it incorrectly, or rather, your back-up architecture is wrong.What do you need this tar for? If this is a “second backup,” why is it launched from bacula, if it has no relation to it? Trying to serialize tasks? Well, they have been correctly serialized with you, the disk and other resources are occupied with one specific task at any given time.

on January 10th, 2020 (7:58 pm)
All coments
This job has not been commented yet.