aboutsummaryrefslogtreecommitdiff
path: root/handlers/dup.in
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2010-05-06 19:27:18 +0200
committerintrigeri <intrigeri@boum.org>2010-05-06 19:27:18 +0200
commit33365d09530426b15fa7395c77fab4d163d8e684 (patch)
treeca16e409b5fcac1baf7e8a9ba5179291a6a95a76 /handlers/dup.in
parent25f50151e77805e9c010d7f4244e38089cfdd0a7 (diff)
downloadbackupninja-33365d09530426b15fa7395c77fab4d163d8e684.tar.gz
backupninja-33365d09530426b15fa7395c77fab4d163d8e684.tar.bz2
dup: use --archive-dir /var/backups/duplicity unless the user has specified it (Closes: 580213)
Diffstat (limited to 'handlers/dup.in')
-rw-r--r--handlers/dup.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/handlers/dup.in b/handlers/dup.in
index 16b5af2..b881b0a 100644
--- a/handlers/dup.in
+++ b/handlers/dup.in
@@ -193,6 +193,15 @@ if [ -n "$tmpdir" ]; then
precmd="${precmd}TMPDIR=$tmpdir "
fi
+### Archive directory
+# duplicity >= 0.6.01 enables the archive_dir by default, let's put it into /var/backups
+# unless the user has specified it.
+if [ "$duplicity_major" -ge 0 -a "$duplicity_minor" -ge 6 -a "$duplicity_sub" -ge 1 ]; then
+ if echo "${options}" | grep -qv -- "--archive-dir" ; then
+ execstr_options="${execstr_options} --archive-dir /var/backups/duplicity"
+ fi
+fi
+
### Cleanup old backup sets (or not)
if [ "$keep" != "yes" ]; then
if [ "`echo $keep | tr -d 0-9`" == "" ]; then