diff options
Diffstat (limited to 'files')
-rw-r--r-- | files/handlers/rsync | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/files/handlers/rsync b/files/handlers/rsync index a81283f..3d5f22f 100644 --- a/files/handlers/rsync +++ b/files/handlers/rsync @@ -416,6 +416,9 @@ function rotate_long { $nice mv $dir.$i $dir.$next mkdir -p $metadata.$next date +%c%n%s > $metadata.$next/rotated + if [ -f $metadata.$i/created ]; then + $nice mv $metadata.$i/created $metadata.$next + fi else echo "Debug: skipping rotation of $dir.$i because $dir.$next already exists." fi @@ -432,6 +435,9 @@ function rotate_long { $nice mv $backuproot/daily.$max $backuproot/weekly.1 mkdir -p $backuproot/metadata/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/ + #fi fi max=$((keepweekly+1)) @@ -440,6 +446,9 @@ function rotate_long { $nice mv $backuproot/weekly.$max $backuproot/monthly.1 mkdir -p $backuproot/metadata/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/ + #fi fi for rottype in daily weekly monthly; do @@ -517,6 +526,9 @@ function rotate_long_remote { $nice mv \$dir.\$i \$dir.\$next mkdir -p \$metadata.\$next date +%c%n%s > \$metadata.\$next/rotated + if [ -f \$metadata.\$i/created ]; then + $nice mv \$metadata.\$i/created \$metadata.\$next + fi else echo "Debug: skipping rotation of \$dir.\$i because \$dir.\$next already exists." fi @@ -533,6 +545,9 @@ function rotate_long_remote { $nice mv $backuproot/daily.\$max $backuproot/weekly.1 mkdir -p $backuproot/metadata/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/ + #fi fi max=\$((keepweekly+1)) @@ -541,6 +556,9 @@ function rotate_long_remote { $nice mv $backuproot/weekly.\$max $backuproot/monthly.1 mkdir -p $backuproot/metadata/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/ + #fi fi for rottype in daily weekly monthly; do |