On 12.11.19 at 07:59 wrote Spadajspadaj:
> Hi there.
> 
> I added a laptop client to my bareos setup and everything runs mostly
> fine except for the fact that if the job is scheduled for - let's say -
> 9pm, it tries to run, tries to connect to fd and since the laptop is
> down, the job fails.
> 
> I was wondering how I can avoid those failed jobs and possibly have
> bareos server wait for a client to appear.
> 
> I pondered two options:
> 
> 1) Have completely manual "schedule", so the job never runs on its own.
> I need to manually run the job every time I have a laptop available in
> my network. But I'm not sure I can specify a schedule which never runs
> on its own. Is it even possible? Or
> 
> 2) Have bareos server wait for the fd to appear on the network. Now
> that's trickier. I thought about writing a script and running it as a
> pre-job script effectively delaying start of the job itself until I can
> reach the fd but:
> 
> a) I'm not sure if the pre-job script is run before the initial
> connection to fd or after. (haven't tried it yet; just thought about it
> today driving to work :-)) and
> 
> b) If I understand correctly, such job with a pre-job script would
> effectively block other jobs from running in the same time, right? So if
> I have a schedule for all jobs to start at 9pm, then other jobs (for now
> let's not complicate matters with priorities) would wait for my script
> to time-out with the Max Run Time limit?
> 
> Any other ideas?
> 
> What I would ideally want to achieve is to have bareos do a backup of my
> laptop when it gets available on the network (when I come back home and
> power on the laptop) but of course not more than once a day.
> 
> Of course I can (and probably will if there are no other options) do an
> external script which probes the network for the laptop and if found
> runs the apropriate job but I was wondering if I can do something like
> that "from within" bareos.

You can solve this with a combination of
https://docs.bareos.org/TasksAndConcepts/NetworkSetup.html#client-initiated-connection
and the external script
https://github.com/bareos/bareos-contrib/blob/master/misc/triggerjob/triggerjob.py
run by cron.

Triggerjob will look for all clients connected to the Director.
If is finds a job named backup-{clientname} that did not successfully
run during the specified time period, it will trigger this job.

The upcoming Bareos 19.2.4 will also add an additional feature to the
Bareos core.

Regards,
Jörg


-- 
 Jörg Steffens                   joerg.steff...@bareos.com
 Bareos GmbH & Co. KG            Phone: +49 221 630693-91
 http://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:
 S. Dühr, M. Außendorf, Jörg Steffens, P. 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 bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/qqdpf6%243thv%241%40blaine.gmane.org.

Reply via email to