Preserve mtimes on deploy !2

merged merged by cmc on 2026-08-31 05:35 UTC · cmc/cleberg.net:rsync-preserve-times into main

Discussion

cmc

deploy_to_server ran rsync -r, which does not preserve modification times. Every transferred file took the time it arrived, so the next deploy found no mtime it agreed with and re-sent the entire site — 206 files each time, regardless of what changed.

-rt fixes it.

Measured against the live server, dry-run transfer counts:

  • before, with mtimes already wrong from prior deploys: 206
  • after one deploy that writes correct mtimes: 0

The itemized flags tell the same story: files that only differed in timestamp showed as <f..T...., not <f.sT.....