BackupPC-users

[BackupPC-users] [PATCH] More granular check of pre/post user scripts

2013-09-11 07:17:33
Subject: [BackupPC-users] [PATCH] More granular check of pre/post user scripts
From: Davide Brini <dave_br AT gmx DOT com>
To: backuppc-users AT lists.sourceforge DOT net
Date: Wed, 11 Sep 2013 13:09:37 +0200
Hello,

the attached patch introduces finer-grained check of pre/post user
command failure. Currently this is controlled with
$Conf{UserCmdCheckStatus} which is an all-or-nothing switch, so if it's set
to 1 and a non-critical script fails, the whole backup fails. However,
there may be cases where that is not wanted or needed, for example a
DumpPostUserCmd may be some email notification or other non-critical action
that may fail even if the actual xfer was ok, without the need to
invalidate the dump and throw everything away. In general, one may have
various pre/post commands that are ran when the dump is performed, some of
which are critical and some of which are not.

So this patch introduces new configuration options like
$Conf{DumpPreUserCmdCheckStatus}, $Conf{DumpPostUserCmdCheckStatus} etc.
that can be individually set to fine-tune failure behavior. They are
evaluated only when the main switch $Conf{CmdCheckStatus} is set to 0;
if $Conf{UserCmdCheckStatus} is set to 1, it still has priority over any
other option, so the patch should be backwards compatible with existing
configurations without breaking anything.

The patch is against 3.3.0.

Any comment or criticism is welcome.

Regards,

-- 
D.

Attachment: pre_post_check.diff
Description: Text Data

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
<Prev in Thread] Current Thread [Next in Thread>
  • [BackupPC-users] [PATCH] More granular check of pre/post user scripts, Davide Brini <=