Backup PC when available/turned on

337 views
Skip to first unread message

Ben Erridge

unread,
Feb 12, 2015, 9:33:18 AM2/12/15
to bareos...@googlegroups.com
Is there a way to trigger a backup based on availability of client-fd?
I have a laptop that travels a lot and is not generally available for a scheduled backup. I would like to configure Bareos so that it will trigger a backup when the laptop is available. Is that possible?

Philipp Storz

unread,
Feb 12, 2015, 10:14:09 AM2/12/15
to bareos...@googlegroups.com
Hello Ben,

of course it is possible.

One option is to use "reschedule jobs" which allows you to reschedule a job if it fails. This way
you could try to backup the job multiple times a day.

See Reschedule Interval, Reschedule On Error and Reschedule Times in the bareos documentation.
This would just retry, but not really do trigger the backup when the laptop is available.


If you want to trigger the backup when your laptop is available, you could create a script
that checks if your laptop is there and only then trigger the backup, and run that regularly via
cron on the backup server.


A quick and dirty hack could be something like ( if your client is named "client-fd" and the
corresponding job "client"):

echo "status client=client-fd" | bconsole | grep "Running Jobs:" \
&& echo "run job=client yes" | bconsole

This will run the "status client" command for your file daemon on your laptop, and execute the
job if it is available (e.g returns the status which contains "Running Jobs:"


Of course this script might need some enhancement to make sure the job is not started multiple times
a day and so on.

You might want to set the parameters for "Maximum Full Interval".

Best regards,

Philipp


--
Mit freundlichen Grüßen

Philipp Storz philip...@bareos.com
Bareos GmbH & Co. KG Phone: Phone: +49221630693-92
http://www.bareos.com Fax: +49221630693-10

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Geschäftsführer: Stephan Dühr, M. Außendorf,
J. Steffens, P. Storz, M. v. Wieringen

Ben Erridge

unread,
Feb 12, 2015, 11:55:52 AM2/12/15
to Philipp Storz, bareos...@googlegroups.com
Thanks for the ideas. I will try making a script because I don't like the idea of getting failure emails all the time.


--
You received this message because you are subscribed to a topic in the Google Groups "bareos-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bareos-users/IbIbAcBEQAs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bareos-users...@googlegroups.com.
To post to this group, send email to bareos...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Benjamin Erridge
Reply all
Reply to author
Forward
0 new messages