Thanks for all the input. This is a bit too simple because it does not check 
anything like if there's a job running or some other bconsole session running 
and so on.

I wrote something, maybe it's useful for others. It's available via subversion 
from here:

  http://svn.tuebingen.mpg.de/stark/admin/scripts/trigger_bacula.sh


-Sebastian

On Thursday 07 July 2005 16:17, Phil Stracchino wrote:
> On Thu, Jul 07, 2005 at 01:55:20PM +0200, Sebastian Stark wrote:
> > I want to write a script that laptop users can run to trigger a backup of
> > their laptop. Scheduling does not work for them because the laptops are
> > connected to the net very irregularly.
> >
> > The idea is to plug the ethernet, log in to the backup server and run
> > "backupmylaptop" or something. My first approach would be to have
> > something with the suid-bit set that pipes the command "run
> > client=myclient level=incremental".
> >
> > Has someone ever done a script like this and already knows the pitfalls?
> > Are there better ways?
>
> There is already a script to do this in the Samples directory, I
> believe.  Basically, all it needs to do is start a restricted console
> and feed it the appropriate Run command from a file.
>
> This is the 'backup' script I have, from the Bacula distribution:
>
> #!/bin/sh
> #
> #  A small script to start a Backup job from any Client machine
> #
> # You may need to add a full path and possibly the console.conf location
> #
> # Assume we are in the binary directory
> #
> JOB="Whitestar Save"
> #
> /bacula/bin/bconsole -c /bacula/bin/console.conf <<END_OF_DATA
> run ${JOB}
> y
> quit
> END_OF_DATA

-- 
Sebastian Stark -- http://www.kyb.tuebingen.mpg.de/~stark
Max Planck Institute for Biological Cybernetics


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to