Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
backupninja
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Liberate
backupninja
Commits
1c6677eb
Commit
1c6677eb
authored
11 years ago
by
intrigeri
Browse files
Options
Downloads
Patches
Plain Diff
Add option to include rdiff-backup output in reports.
Thanks to David Gasaway <dave@gasaway.org> for the patch.
parent
0dbac2a1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/example.rdiff
+14
-0
14 additions, 0 deletions
examples/example.rdiff
handlers/rdiff.in
+11
-2
11 additions, 2 deletions
handlers/rdiff.in
with
25 additions
and
2 deletions
examples/example.rdiff
+
14
−
0
View file @
1c6677eb
...
@@ -53,6 +53,20 @@
...
@@ -53,6 +53,20 @@
## Default:
## Default:
# ignore_version = no
# ignore_version = no
## 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.
##
## Default:
# output_as_info = no
######################################################
######################################################
## source section
## source section
## (where the files to be backed up are coming from)
## (where the files to be backed up are coming from)
...
...
This diff is collapsed.
Click to expand it.
handlers/rdiff.in
+
11
−
2
View file @
1c6677eb
...
@@ -85,6 +85,7 @@ getconf testconnect yes
...
@@ -85,6 +85,7 @@ getconf testconnect yes
getconf nicelevel 0
getconf nicelevel 0
getconf bwlimit
getconf bwlimit
getconf ignore_version no
getconf ignore_version no
getconf output_as_info no
setsection
source
setsection
source
getconf
type
;
sourcetype
=
$type
getconf
type
;
sourcetype
=
$type
...
@@ -182,7 +183,11 @@ if [ "$keep" != yes ]; then
...
@@ -182,7 +183,11 @@ if [ "$keep" != yes ]; then
if
[
$test
=
0
]
;
then
if
[
$test
=
0
]
;
then
output
=
"
`
su
-c
"
$removestr
"
2>&1
`
"
output
=
"
`
su
-c
"
$removestr
"
2>&1
`
"
if
[
$?
=
0
]
;
then
if
[
$?
=
0
]
;
then
debug
$output
if
[
"
$output_as_info
"
==
"yes"
]
;
then
info
$output
else
debug
$output
fi
info
"Removing backups older than
$keep
days succeeded."
info
"Removing backups older than
$keep
days succeeded."
else
else
warning
$output
warning
$output
...
@@ -268,7 +273,11 @@ debug "$execstr"
...
@@ -268,7 +273,11 @@ debug "$execstr"
if
[
$test
=
0
]
;
then
if
[
$test
=
0
]
;
then
output
=
`
nice
-n
$nicelevel
su
-c
"
$execstr
"
2>&1
`
output
=
`
nice
-n
$nicelevel
su
-c
"
$execstr
"
2>&1
`
if
[
$?
=
0
]
;
then
if
[
$?
=
0
]
;
then
debug
$output
if
[
"
$output_as_info
"
==
"yes"
]
;
then
info
$output
else
debug
$output
fi
info
"Successfully finished backing up source
$label
"
info
"Successfully finished backing up source
$label
"
else
else
error
$output
error
$output
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment