Delay job on incoming connect?

28 views
Skip to first unread message

spadaj...@gmail.com

unread,
Jan 22, 2024, 4:14:11 AM1/22/24
to bareos-users
Hi.
Is there a possibiliry to delay a job from a passive client?
I have a job defined simply like this:
Job {
  Name = "laptop"
  JobDefs = "DefaultJob"
  Schedule= "EarlyWeeklyCycle"
  Fileset = "LinuxDocs"
  Client = "laptop-fd"
  Priority = 5
  Run On Incoming Connect Interval = 12h
}
The client here has "connection from client to director=yes"

It's as simple as it gets.
And it works pretty good. The problem is that by default the laptop connects to wifi on power on and while it's OK for most times, sometimes (especially when I want to do the full backup) I want to have it connected with cable ethernet. The problem is that right after the power on the FD starts, connects to the director and the backup job is spawned. And if I switch my connection from the default wifi to cable, the job is left hanging on both sides (FD and dir) and I have to restart both the FD and director. It's not pretty.
I'm wondering if I can do something to make it all more robust.

MK

Jörg Steffens

unread,
Jan 24, 2024, 8:03:20 AM1/24/24
to bareos...@googlegroups.com
You could try to implement you own logic based on
https://github.com/bareos/bareos/tree/master/contrib/misc/triggerjob

So let a python script check for connected clients and start a job when
you criteria is matched. You would than disable "Run On Incoming Connect
Interval".

Regards,
Jörg

On 22.01.24 at 10:14 wrote spadaj...@gmail.com:
> --
> 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 bareos-users...@googlegroups.com
> <mailto:bareos-users...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/bareos-users/cb6b8767-f9bc-4802-b96a-7d6658140606n%40googlegroups.com <https://groups.google.com/d/msgid/bareos-users/cb6b8767-f9bc-4802-b96a-7d6658140606n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Jörg Steffens joerg.s...@bareos.com
Bareos GmbH & Co. KG Phone: +49 221 630693-91
https://www.bareos.com Fax: +49 221 630693-10

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


Spadajspadaj

unread,
Jan 24, 2024, 8:43:11 AM1/24/24
to bareos...@googlegroups.com
Of course, using external scripting I can do anything ;-)

I was wondering if there is anything built in. I don't think so.

MK
Reply all
Reply to author
Forward
0 new messages