aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorElijah Saxon <elijah@riseup.net>2005-10-02 12:45:12 +0000
committerElijah Saxon <elijah@riseup.net>2005-10-02 12:45:12 +0000
commit995e34e1663e2448dea174412d58ff03ad32c6cc (patch)
tree9db2343d37c8cacb84a5a15a8db205464d5fd1c5 /handlers
parentef4bbe3c2bb4af4c2a77e00f2ca0e8971847c0bd (diff)
downloadbackupninja-995e34e1663e2448dea174412d58ff03ad32c6cc.tar.gz
backupninja-995e34e1663e2448dea174412d58ff03ad32c6cc.tar.bz2
created function maketemp, to be used by backupninja
and maildir handler for creating safe temp files.
Diffstat (limited to 'handlers')
-rw-r--r--handlers/maildir16
1 files changed, 13 insertions, 3 deletions
diff --git a/handlers/maildir b/handlers/maildir
index 0af8ff7..5219bef 100644
--- a/handlers/maildir
+++ b/handlers/maildir
@@ -12,7 +12,17 @@
# weekly.2
# monthly.1
# if keepdaily is 3, keepweekly is 2, and keepmonthly is 1.
-#
+#
+# The basic algorithm is to rsync each maildir individually,
+# and to use hard links for retaining historical data.
+#
+# We rsync each maildir individually because it becomes very
+# unweldy to start a single rsync of many hundreds of thousands
+# of files.
+#
+# For the backup rotation to work, destuser must be able to run
+# arbitrary bash commands on the desthost.
+#
##############################################################
getconf rotate yes
@@ -101,8 +111,8 @@ $dir $destuser@$desthost:$destdir/$letter \
# and add new ones which have just been created.
function do_remove() {
- local tmp1=/tmp/maildirtmpfile$$
- local tmp2=/tmp/maildirtmpfile$$
+ local tmp1=`maketemp maildir-tmp-file`
+ local tmp2=`maketemp maildir-tmp-file`
for i in a b c d e f g h i j k l m n o p q r s t u v w x y z; do
ls -1 "$srcdir/$i" | sort > $tmp1