Two winters ago I was in Göreme for nine days, mostly waiting out snow and taking notes on a beat-up ThinkPad running Debian 12. I kept a plain folder of Markdown files — one per day, plus a places.md and a bus.md — and a small SQLite file where I logged coordinates, prices in lira, and whether a trail was walkable. Nothing fancy. Then the SSD failed on the flight home, and I discovered that my “backup” was a rsync line in a cron job that had been silently failing since I changed the SSH port on the home box.
What I did after that is not a recovery story. The notes were gone. What I rebuilt is the tooling around them, because the lesson was that my notes were too fragile for the way I actually travel: offline for days, cheap hardware, intermittent power.
First, I moved everything to a single append-only log file per trip, plain text, one record per line with a tab separator. Easy to grep, easy to tail, and impossible to corrupt with a half-written editor buffer in a way that loses the whole file.
2024-01-14 goreme 38.6431,34.8289 tea 25TL trail to Uchisar muddy, turned back at 2km
2024-01-15 urgup 38.6300,34.8000 bus 20TL driver waited 10 min, no timetable posted
Second, I stopped trusting cron for backups. A systemd timer with OnFailure= pointing at a local notification was more visible, but what actually fixed it was making the backup a thing I could see: a small script that writes a dated tarball to a USB stick I physically carry, and prints the file size and line count to the terminal. If the numbers don’t look right, I notice before I close the lid.
#!/bin/sh
set -eu
d=$(date +%Y%m%d)
tar -czf /media/usb/notes-$d.tgz ~/notes
wc -l ~/notes/*.log
ls -lh /media/usb/notes-$d.tgz
The mechanism is boring and that is the point: the cost is a few seconds per evening and the discipline of plugging in a stick. The trade-off is no cloud, no sync conflicts, and no dependency on a network that in half the pensions in Kapadokya was worse than the tea.
Where this fails: append-only logs are terrible if you want to edit yesterday’s entry, and I have lost an hour more than once hunting for a typo that I then had to fix with sed and hope. The USB stick is also a single point of failure — I have not solved offsite, and I know it. And a line-based format breaks the moment a note contains a tab, which happened with a copied bus schedule.
What I still cannot decide: is a paper notebook plus a weekly photo of the pages actually more robust than any of this, given that my failure mode was hardware, not software?
0 条评论
还没有评论,写下第一条。