Hi,

[email protected] wrote on 2013-10-02 14:08:16 -0400 [Re: [BackupPC-devel] 
[PATCH] More granular check of pre/post user scripts]:
> Davide Brini wrote at about 17:57:22 +0200 on Wednesday, October 2, 2013:
>  > [...]
>  > 
>  > IIUC, a sequence of commands can *not* be given, since a shell is not
>  > spawned. [...]
> 
> Not true -- you can use "bash -c"
> $Conf{DumpPreUserCmd} = ['bin/bash', '-c', 'original command', '/bin/true'];

shouldn't that be ...

   $Conf{DumpPreUserCmd} = ['/bin/bash', '-c', 'original command || /bin/true'];

? :)

>  > And anyway, one may want to know and be notified if a script fails. 
>  > [...]
> 
> If it truly failed as a backup to the extent that there is some issue
> with the quality of the backup, why would you want it to keep the data;

You wouldn't.

> if it didn't truly fail, then why do you care if backuppc thinks it
> succeeded as a backup.

The point is that you might want to see a log entry to the effect that
DumpPostUserCmd returned a non-zero exit status - something isn't working as
expected, even though the backup is succeeding. It's nothing BackupPC cares
much about, but you, the user/administrator, might be interested. And yes,
there are other ways to achieve that outside BackupPC. Think of it as a
warning as opposed to an error.

> [...]
> I'm sure one can think of corner cases that lie between the two modes
> of failure, but for the vast majority of the cases, the above is far
> simpler.

Frankly, I can't think of a way to handle things apart from either discarding
the backup or keeping it as valid. Keep the backup but still retry it at the
next wakeup? And then discard it if and only if the new backup succeeds? Not
really ...

> I just don't see the need to add the complexity of new
> variables for the vast majority of use cases.

I tend to agree.

> That doesn't mean your
> patch isn't useful to you and maybe some others but I question its
> general utility relative to the complexity, especially given that 3.x
> is no longer being actively developed for new functionality.
> 
> With the simple mod I suggest, then you can think of each command as
> either being required or not required to succeed for the backup to
> continue and complete.

I tend to agree there, too. I don't think there is great general demand for an
implementation, but I can understand the idea and the personal need for one.
I'm suggesting a different approach at an implementation if one is done
(though I realize there is little motivation to change anything if this patch
works for you, Davide).

Personally, if I had the requirement in my setup, I'd experiment with a Perl
hook, which can probably achieve the same result without any modification to
the code at all.

Regards,
Holger

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
BackupPC-devel mailing list
[email protected]
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-devel
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

Reply via email to