Project

General

Profile

Bug #11246

rdiff-backup success generale notification

Added by drzraf over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
rdiff-backup handler
Target version:
-
Start date:
03/16/2016
Due date:
% Done:

90%

QA Check:

Description

In the event the rdiff-backup succeeds I would like to feed a backup-manager system.
In my case the email is unsuitable for this system and I'd like to run arbitrary command after the backup.
(backupninja is run from cron, but even the general backupninja status does not tell anything about individual script status)

The attached patch solves the issue: it runs a (configuration originated) command just after backup succeeded and before the execution status (= rdiff-backup return code) is lost (set to 0)
To avoid some quoting/system complexity, the raw command line is run through `bash -c`

rdiffbackup-success-hook-exec.patch View (1.32 KB) drzraf, 03/16/2016 05:48 PM

rdiffbackup-success-hook-exec.patch View (1.43 KB) drzraf, 03/17/2016 05:23 PM

cmd_after.patch View (2.76 KB) drzraf, 03/18/2016 12:02 AM


Related issues

Related to Backupninja - Feature #6727: Ability to run a script before and after a job In Progress 02/18/2014
Blocked by Backupninja - Bug #8185: get returncode of subshell In Progress 10/28/2014

History

#1 Updated by drzraf over 1 year ago

Updated patch to support variable interpolation (see also #11258)

#2 Updated by drzraf over 1 year ago

I needed mysql notification too...
I reworked the beast so that it's independent of the backup backend (so it's now really "general") BUT it expects
#8185 since without general backup action return code, no BACKUP_NINJA_STATUS and command execution loose a lot of its usefulness.

#3 Updated by intrigeri over 1 year ago

  • Related to Feature #6727: Ability to run a script before and after a job added

#4 Updated by intrigeri over 1 year ago

  • Blocked by Bug #8185: get returncode of subshell added

Also available in: Atom PDF