aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre ROUDIER <contact@pierreroudier.net>2013-06-28 10:53:47 +0200
committerintrigeri <intrigeri@boum.org>2013-06-30 12:20:25 +0200
commit4ebee050b49ed882aa3d778e9d971b2df29fd158 (patch)
treedba622353a1d0fa016dec98890f1102cb7907646
parentaa7009fb34ae468babfd957ca6829477f9beaf3e (diff)
downloadbackupninja-4ebee050b49ed882aa3d778e9d971b2df29fd158.tar.gz
backupninja-4ebee050b49ed882aa3d778e9d971b2df29fd158.tar.bz2
test mode support for tar handler
-rw-r--r--handlers/tar.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/handlers/tar.in b/handlers/tar.in
index eb5942b..7497306 100644
--- a/handlers/tar.in
+++ b/handlers/tar.in
@@ -72,11 +72,13 @@ debug "Running backup: " $TAR -c -p -v $compress_option $exclude_options \
-f "$backupdir/$backupname-"`$DATE "+$DATEFORMAT"`".$EXTENSION" \
$includes
+if [ ! $test ]; then
$TAR -c -p -v $compress_option $exclude_options \
-f "$backupdir/$backupname-"`$DATE "+$DATEFORMAT"`".$EXTENSION" \
$includes \
> "$backupdir/$backupname-"`$DATE "+$DATEFORMAT"`.list \
2> "$backupdir/$backupname-"`$DATE "+$DATEFORMAT"`.err
+fi
[ $? -ne 0 ] && fatal "Tar backup failed"