From 15b92db9913cf0c0098fab02d05bd1c90f9af771 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 28 Feb 2012 01:00:45 -0300 Subject: Rsync handler: use the backup start time and not the time the backup was finished (Debian #654192) --- handlers/rsync.in | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/handlers/rsync.in b/handlers/rsync.in index e253c5c..884a885 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 < $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 -- cgit v1.2.3 From 1553fc794b17dfea592e142fdd01fd4669fa7fb9 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Mon, 26 Mar 2012 20:20:50 +0200 Subject: Update ChangeLog. --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0eeea03..1e20e00 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25,6 +25,8 @@ version 1.0 -- UNRELEASED . Use fatal instead of custom "exit 1" (Redmine#3721). . Abort on rsync error (Redmine#3692). . Cleanup orphaned metadata (Redmine#3727). + . Use the backup start time and not the time the backup was finished + (Closes: #654192) build system changes . Workaround automake sanity check that would prevent us from installing lib/* into lib/backupninja/. Where else are be supposed -- cgit v1.2.3 From c9aa8b1d6f809ab672032a020a476185d095de3c Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 27 Mar 2012 10:49:26 -0400 Subject: remove maildir handler 'loadlimit' - it is not used anywhere --- handlers/maildir.in | 1 - 1 file changed, 1 deletion(-) 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 -- cgit v1.2.3