Hi Davide,

thank you very much for your response. I already tried to crawl the
mailing list archive prior to sending this email but I also came up
empty :-(

From the manual link you provided I understand two things:

1) "Consoleoptions are special commands that are _sent to the director_
instead of the OS"

-> this means that the following line

Console ="delete yes volume=%v"

should have worked, right?

2) The directive

RunsOnClient  = no

indicates, according to the manual, that the command is _not run on
Client_  - so where does it run? I assume on the director?

Furthermore, the manual states:

Some character substitutions are not available in all situations.

In my humble opinion, it would be beneficial to have a matrix which
substitution will or will not work in which situation. I would be happy
to create such a matrix if there was some "authoritive answer" e.g. some
way to be sure to have the correct information :-) (and, to be honest,
if it would not involve extracting it from source code... I'm not really
got at coding :-()

Well, I will keep digging :-)

Thanks again,
Cheers,
Thorsten


On 12.01.20 14:49, Davide Franco wrote:
Hi Thorsten,

As mentioned in documentation

https://www.bacula.org/9.4.x-manuals/en/main/Configuring_Director.html#SECTION002030000000000000000

%v is only available from the director.

Make sure the script is run from the director.

Try to look at bacula users mailing list archive, I’m sure someone
already asked for the same question but I can’t find it yet.

Hope it helps

Davide

On Sat, 11 Jan 2020 at 11:38, Thorsten Johannsen
<thorsten-johann...@gmx.net <mailto:thorsten-johann...@gmx.net>> wrote:

    Hi,

    I'm using Bacula 9.0.7 and try to delete volumes that were created but
    where the backup job did not complete.

    E.g.

    2020-01-11 11:04:45heZZZ-dir JobId 10826: Start Backup JobId
    10826, Job=Job_XXX02.2020-01-11_11.04.43_09
    2020-01-11 11:04:46heZZZ-dir JobId 10826: Created new
    Volume="IncBackup__XXX02-fd__10826__2020-01-11T11.04.45",
    Pool="Pool_IncBackup", MediaType="MT-heZZZ-sd-AC-IncBackup" in
    catalog.
    2020-01-11 11:04:46heZZZ-dir JobId 10826: Using Device
    "AC-IncBackup-Dev01" to write.
    2020-01-11 11:05:02heZZZ-dir JobId 10826: Warning: bsock.c:153
    Could not connect to Client: heXXX02-fd on heXXX02:9102. ERR=No
    route to host



    so:
    1) Volume is created
    2) Client connect failed
    3) Volume is created but empty.

    I thought I could catch this with a runscript in the JobDefs:

    ------------------------------------------------------------
    JobDefs {
       Name = "JD_heDefault"
       Type = "Backup"

    [...]

      RunScript {
       #Console ="delete yes volume=%v"
       Command = "echo delete yes volume=%v | bconsole"
       RunsWhen = After
       RunsOnFailure = yes
       RunsOnClient  = no
       RunsOnSuccess = no
    }

    }


    ------------------------------------------------------------

    I tried with command= as stated above and also with
    Console="delete yes volume=%v". Both does not work. It seems as if
    %v does not get substituted. eMail notifcation shows:

    2020-01-11 11:07:58heZZZ-dir JobId 10826: console command: run
    AfterJob "delete yes volume="


    Can someone give me a hint about what I'm doing wrong here?

    Thanks in advance,

    Thorsten



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


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

Reply via email to