Hi Jon
it looks like "AfterJob" RunScripts are run when 1) a cancel command is
received for that job and 2) when the job is finished.
Is it possible that your delete-canceled-job.sh script tries to cancel
the job ? Or was this job canceled manually ?
Either case would explain what you are seeing. Feel free to open an
issue about this as it looks like a logic bug.
Kind Regards
Sebastian Sura
Am 29.10.24 um 15:29 schrieb Jon Schewe:
I have a RunScript setup to execute after all of my jobs and I'm
finding that it's running twice rather than the expected once.
Here is my configuration and the output from a run.
Job {
Name = "filer-01.bbn.com-onsite"
JobDefs = "onsite-LTO-8"
Client = "filer-01.bbn.com-fd"
FileSet = "filer-01.bbn.com"
}
JobDefs {
Name = "onsite-LTO-8"
# JobDefs = "base"
# base.conf
Type = Backup
Level = Incremental
Messages = Standard
Write Bootstrap = "/var/lib/bareos/%c.bsr"
Priority = 30
Rerun Failed Levels = yes
Accurate = yes
Spool Data = yes
# retry failed backups
Reschedule On Error = yes
Reschedule Interval = 1 minute
Reschedule Times = 10
AllowDuplicateJobs = no
CancelLowerLevelDuplicates = yes
CancelQueuedDuplicates = yes
# handle long running jobs and canceling duplicates
RunScript {
RunsWhen = After
RunsOnFailure = Yes
FailJobOnError = No
RunsOnClient = No
Command = "/etc/bareos/delete-canceled-job.sh %e %i"
}
# # backup bootstrap files to DRS site
# RunScript {
# RunsOnClient = no
# RunsWhen = After
# FailJobOnError = no
# Command = "/usr/local/bum/sbin/copy-bareos-bootstrap.sh"
# }
# end base.conf
Schedule = "WeeklyCycle"
Pool = onsite-LTO-8
Storage = LTO-8
Next Pool = offsite-LTO-8
}
2024-10-29 10:19:52 bareos-dir JobId 214: shell command: run AfterJob
"/etc/bareos/delete-canceled-job.sh Canceled 214"
2024-10-29 10:19:52 bareos-dir JobId 214: AfterJob: Deleting canceled
job 214
2024-10-29 10:19:52 bareos-dir JobId 214: AfterJob: warning: commands
will be executed using /bin/sh
2024-10-29 10:19:52 bareos-dir JobId 214: AfterJob: job 35 at Tue Oct
29 10:49:00 2024
2024-10-29 10:19:52 bareos-dir JobId 214: shell command: run AfterJob
"/etc/bareos/delete-canceled-job.sh Canceled 214"
2024-10-29 10:19:52 bareos-dir JobId 214: AfterJob: Deleting canceled
job 214
2024-10-29 10:19:52 bareos-dir JobId 214: AfterJob: warning: commands
will be executed using /bin/sh
2024-10-29 10:19:52 bareos-dir JobId 214: AfterJob: job 36 at Tue Oct
29 10:49:00 2024
Can anyone give me some ideas as to why the RunScript is executing twice?
--
You received this message because you are subscribed to the Google
Groups "bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/bareos-users/f366bc1e-baf7-4dda-b13e-569edd63f4ffn%40googlegroups.com
<https://groups.google.com/d/msgid/bareos-users/f366bc1e-baf7-4dda-b13e-569edd63f4ffn%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
Sebastian [email protected]
Bareos GmbH & Co. KG Phone: +49 221 630693-0
https://www.bareos.com
Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Komplementär: Bareos Verwaltungs-GmbH
Geschäftsführer: Stephan Dühr, Jörg Steffens, Philipp Storz
--
You received this message because you are subscribed to the Google Groups
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/bareos-users/96554fa6-c332-419b-8725-f9151aee86da%40bareos.com.