aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2005-08-20 18:17:25 +0000
committerintrigeri <intrigeri@boum.org>2005-08-20 18:17:25 +0000
commitbd0b2eaea8db2aecd8ba6f061901d4a41a0881a2 (patch)
treefb46b3cb8f0d9cd6edfda7e0215f688a36fc7614
parentaa6248865640800ec5ad7920c96de3bc834f49d1 (diff)
downloadbackupninja-bd0b2eaea8db2aecd8ba6f061901d4a41a0881a2.tar.gz
backupninja-bd0b2eaea8db2aecd8ba6f061901d4a41a0881a2.tar.bz2
dup handler: added option to perform a full backup instead of an incremental one.
-rw-r--r--etc/backup.d/example.dup4
-rw-r--r--handlers/dup5
2 files changed, 9 insertions, 0 deletions
diff --git a/etc/backup.d/example.dup b/etc/backup.d/example.dup
index cd64dd5..7db7771 100644
--- a/etc/backup.d/example.dup
+++ b/etc/backup.d/example.dup
@@ -82,6 +82,10 @@ exclude = /home/*/.gnupg
[dest]
+# perform an incremental backup? (default = yes)
+# if incremental = no, perform a full backup in order to start a new backup set
+#incremental = yes
+
# how many days of data to keep ; default is 60 days.
# (you can also use the time format of duplicity)
# 'keep = yes' means : do not delete old data, the remote host will take care of this
diff --git a/handlers/dup b/handlers/dup
index 176ac3e..8d38cfc 100644
--- a/handlers/dup
+++ b/handlers/dup
@@ -19,6 +19,7 @@ getconf vsinclude
getconf exclude
setsection dest
+getconf incremental yes
getconf keep 60
getconf sshoptions
getconf bandwidthlimit 0
@@ -92,6 +93,10 @@ if [ "$keep" != "yes" ]; then
execstr="${execstr}--remove-older-than $keep "
fi
+if [ "$incremental" == "no" ]; then
+ execstr="${execstr}--full "
+fi
+
execstr_serverpart="scp://$destuser@$desthost/$destdir"
execstr_clientpart="/"