aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2013-07-09 19:45:29 +0000
committerintrigeri <intrigeri@boum.org>2013-07-09 21:45:44 +0200
commite732e8475002c73f2eb66a073a7efb6f200a3360 (patch)
tree7766b803624ce083312b8e9387db94506252147a /handlers
parentc7a191f21ca124ac24c89ea6581ebc9eb3b2a5b1 (diff)
downloadbackupninja-e732e8475002c73f2eb66a073a7efb6f200a3360.tar.gz
backupninja-e732e8475002c73f2eb66a073a7efb6f200a3360.tar.bz2
rdiff.helper: add output_as_info support.
Thanks to David Gasaway <dave@gasaway.org> for the patch!
Diffstat (limited to 'handlers')
-rw-r--r--handlers/rdiff.helper.in23
1 files changed, 23 insertions, 0 deletions
diff --git a/handlers/rdiff.helper.in b/handlers/rdiff.helper.in
index 1597305..27459d0 100644
--- a/handlers/rdiff.helper.in
+++ b/handlers/rdiff.helper.in
@@ -282,12 +282,33 @@ do_rdiff_con() {
setDefault finish
}
+do_rdiff_adv() {
+ booleanBox "$rdiff_title" "Should backupninja write program output as Info messages rather than Debug messages?" no
+ if [ $? = 0 ]; then
+ rdiff_output_as_info=yes
+ else
+ rdiff_output_as_info=no
+ fi
+}
+
do_rdiff_finish() {
get_next_filename $configdirectory/90.rdiff
cat > $next_filename <<EOF
# options = --force
# when = everyday at 02
+## should backupninja write program output as Info messages rather than Debug
+## messages? (default: no)
+## Usually rdiff-backup output (for increment expiration and backup) is written
+## to output as Debug messages; this option causes backupninja to use Info-level
+## messages instead. Since backup reports include Info messages, this option is
+## useful to receive output like rdiff-backup session statistics in reports. In
+## addition, since rdiff-backup has a habit of using a zero exit code when
+## non-fatal errors are encountered (causing backupninja to conclude the backup
+## was entirely successful), this option is useful for inspecting non-fatal
+## filesystem and permission errors from rdiff-backup.
+output_as_info = $rdiff_output_as_info
+
[source]
type = local
keep = $rdiff_keep
@@ -378,6 +399,7 @@ rdiff_main_menu() {
src "$srcitem" \
dest "$destitem" \
conn "$conitem" \
+ adv "$advitem" \
finish "finish and create config file"
[ $? = 0 ] || return
result="$REPLY"
@@ -411,6 +433,7 @@ rdiff_wizard() {
rdiff_type=remote
rdiff_user=
rdiff_host=
+ rdiff_output_as_info="no"
# Global variables whose '*' shall not be expanded
set -o noglob