aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-05-09 19:27:46 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-04-07 17:45:27 -0300
commit48134276246a13ac1da72279997f1fac20a1c731 (patch)
tree5fdfb3b21df26d272dcb0973e6ec20c7a5b14da7 /handlers
parent7c70c834cca22ad6ce1f6b33ccdd507f31fbfdd2 (diff)
downloadbackupninja-48134276246a13ac1da72279997f1fac20a1c731.tar.gz
backupninja-48134276246a13ac1da72279997f1fac20a1c731.tar.bz2
Update increment folder date (#3929)
Diffstat (limited to 'handlers')
-rw-r--r--handlers/rsync.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/handlers/rsync.in b/handlers/rsync.in
index 4905ace..ba8a521 100644
--- a/handlers/rsync.in
+++ b/handlers/rsync.in
@@ -456,6 +456,8 @@ function rotate_long {
debug "daily.$max --> weekly.1"
$nice mv $backuproot/daily.$max $backuproot/weekly.1
mkdir -p $backuproot/metadata/weekly.1
+ # Update increment folder date and setup metadata
+ $touch $backuproot/weekly.1
date +%c%n%s > $backuproot/metadata/weekly.1/rotated
#if [ -f $backuproot/metadata/daily.$max/created ]; then
# $nice mv $backuproot/metadata/daily.$max/created $backuproot/metadata/weekly.1/
@@ -467,6 +469,8 @@ function rotate_long {
debug "weekly.$max --> monthly.1"
$nice mv $backuproot/weekly.$max $backuproot/monthly.1
mkdir -p $backuproot/metadata/monthly.1
+ # Update increment folder date and setup metadata
+ $touch $backuproot/monthly.1
date +%c%n%s > $backuproot/metadata/monthly.1/rotated
#if [ -f $backuproot/metadata/weekly.$max/created ]; then
# $nice mv $backuproot/metadata/weekly.$max/created $backuproot/metadata/weekly.1/
@@ -579,6 +583,8 @@ function rotate_long_remote {
echo "Debug: daily.\$max --> weekly.1"
$nice mv $backuproot/daily.\$max $backuproot/weekly.1
mkdir -p $backuproot/metadata/weekly.1
+ # Update increment folder date and setup metadata
+ $touch $backuproot/weekly.1
date +%c%n%s > $backuproot/metadata/weekly.1/rotated
#if [ -f $backuproot/metadata/daily.\$max/created ]; then
# $nice mv $backuproot/metadata/daily.\$max/created $backuproot/metadata/weekly.1/
@@ -590,6 +596,8 @@ function rotate_long_remote {
echo "Debug: weekly.\$max --> monthly.1"
$nice mv $backuproot/weekly.\$max $backuproot/monthly.1
mkdir -p $backuproot/metadata/monthly.1
+ # Update increment folder date and setup metadata
+ $touch $backuproot/monthly.1
date +%c%n%s > $backuproot/metadata/monthly.1/rotated
#if [ -f $backuproot/metadata/weekly.\$max/created ]; then
# $nice mv $backuproot/metadata/weekly.\$max/created $backuproot/metadata/weekly.1/