aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-05-10 18:16:32 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-05-10 18:16:32 -0300
commitf2f7e8cdb34416c42f4676c5183e6559f86478c5 (patch)
treec33985b6178e76e43a26a0485410716bddbe7e6d /handlers
parent1fda206fa22dc2f97faf90e96ecd4cd8955d2cf1 (diff)
parentc9aa8b1d6f809ab672032a020a476185d095de3c (diff)
downloadbackupninja-f2f7e8cdb34416c42f4676c5183e6559f86478c5.tar.gz
backupninja-f2f7e8cdb34416c42f4676c5183e6559f86478c5.tar.bz2
Merge branches 'master' and 'bug/3840' into bug/3840bug/3840
Diffstat (limited to 'handlers')
-rw-r--r--handlers/maildir.in1
-rw-r--r--handlers/rsync.in15
2 files changed, 12 insertions, 4 deletions
diff --git a/handlers/maildir.in b/handlers/maildir.in
index 148c30d..912c0e6 100644
--- a/handlers/maildir.in
+++ b/handlers/maildir.in
@@ -57,7 +57,6 @@ getconf rotate yes
getconf remove yes
getconf backup yes
-getconf loadlimit 5
getconf speedlimit 0
getconf keepdaily 5
getconf keepweekly 3
diff --git a/handlers/rsync.in b/handlers/rsync.in
index a9dae06..d475843 100644
--- a/handlers/rsync.in
+++ b/handlers/rsync.in
@@ -826,7 +826,11 @@ function update_metadata {
if [ "$dest" == "local" ]; then
metadata="`dirname $dest_path`/metadata/`basename $dest_path`"
mkdir -p $metadata
- date +%c%n%s > $metadata/created
+ # Use the backup start time and not the time the backup was
+ # finished, otherwise daily rotations might not take place.
+ # If we used backup end time, in the next handler run
+ # we might not have $now - $created >= 24:00
+ echo $starttime > $metadata/created
$touch $backupdir/$SECTION/$suffix
else
folder="`echo $dest_path | cut -d : -f 2`"
@@ -836,7 +840,11 @@ function update_metadata {
$ssh_cmd <<EOF
##### BEGIN REMOTE SCRIPT #####
mkdir -p $metadata
- date +%c%n%s > $metadata/created
+ # Use the backup start time and not the time the backup was
+ # finished, otherwise daily rotations might not take place.
+ # If we used backup end time, in the next handler run
+ # we might not have $now - $created >= 24:00
+ echo $starttime > $metadata/created
##### END REMOTE SCRIPT #######
EOF
) | (while read a; do passthru $a; done)
@@ -1102,7 +1110,8 @@ start_mux
stop_services
mount_rw
-echo "Starting backup at `date`" >> $log
+starttime="`date +%c%n%s`"
+echo "Starting backup at `echo $starttime | head -n 1`" >> $log
for SECTION in $include; do