Bacula-users

Re: [Bacula-users] mount command error does not cancel backup

2014-04-23 10:11:11
Subject: Re: [Bacula-users] mount command error does not cancel backup
From: le dahut <le.dahut AT laposte DOT net>
To: Téïcée Bacula <baculafr AT teicee DOT com>, bacula-users AT lists.sourceforge DOT net
Date: Wed, 23 Apr 2014 16:05:27 +0200
23/04/2014 15:07, Téïcée Bacula wrote :
> Hello Klaas
>
>>> Sorry to insist but am I the only one who've noticed that ?
>
> Notice what? The mount command used in a device don't fail the job? Well
> I never needed it.
> Having the detail of your mount operation would probably help a bit or
> at least knowing in  which context you are trying to do this. In other
> words: what put you in this situation? What are your *real* needs?
> It seems to me your problem is "elsewhere".

My problem is that when, for a random reason, SD cannot mount the backup 
device, backup still occurs.

DIR, SD and FD are on a different machine. One or more firewall(s) may 
be installed between each daemon, therefore using only Bacula network 
communication system is mandatory (no SSH or else).


Backup device is an SMB/CIFS share or an external USB drive.

Command :
  /sbin/baculamount.py --mount
mounts the support, if mount succeeds it exits with 0, if mount 
encounters an error, it exits with 1.


The goal is to use Bacula with its own functionalities/tools, eventually 
contribute by testing and fixing bugs like this (I've already 
contributed to ACLs management some years ago, it's in the list 
archives). But I would like to avoid making workarounds.


>>> How can I solve this problem ?
>>>
>>
>> I would try creating a run before job that uses ssh to connect to the
>> remote machine with the SD and in this run before job check if the
>> mount succeeds.
>
> There could be several ways to manage this and IMHO the following should
> be valid:
> - based on John's answer, you might run a "script before" on the FD
> hosted by your SD which will fail the job accordingly. The matter here
> is not to actually mount the drive rather  than testing the fact the
> mount operation is doing well. If the command fails, then your mount
> command will too.
> - you might want to use an Admin job too to do the same and managing
> enabled parameter accordingly e.g.
> - you might also consider to use Messages resource and then "capture"
> the mount message and do the appropriate commands / actions accordingly
>
> and there is a lot more to suggest..  If you don't find any help here, I
> guess you should explain more on your work.
>
> Greg.
>>
>> John
>
> /snip/
>>

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users