lens
DoneBacks up and organizes my footage across drives and Google Drive, from one command.
I can’t shoot a dive twice, and one of my working drives drops to USB 2 and disconnects. lens plans what goes up next, sends the most at-risk trips first, and won’t call anything safe until a fingerprint says so.
- Role
- Solo builder, directing coding agents
- Stack
- Python standard library, rclone
- Scale
- 123 trips and 3.7 TB at the Oct 5 scan
- Size
- About 9,600 lines, 153 tests
- Links
- Source is private
- As of
- Nov 1, 2026
What a backup has to prove
Google’s daily limit is about 750 GB, and it counts every app and copies made inside Drive. A drive can vanish halfway through a copy. A file with the right name and size can still be the wrong file.
So lens treats “it’s backed up” as a claim that needs evidence, and it keeps the evidence.
Decisions
Only add, only check
lens never deletes or overwrites anything in Google Drive: rclone copy --immutable, never sync, move or delete. Original drives stay untouched. At any destination, an identical file is adopted and a different one is reported as a conflict and left alone.
Instead of a sync that can delete
Probably isn’t Confirmed
Confirmed means the file is in the lens library, or its md5 fingerprint matches one Google holds. Probably means a file with the same name and size exists somewhere in Drive.
That isn’t proof, so Probably files still count as at risk until lens confirm reads them and compares fingerprints with Google’s.
Instead of matching on name and size
Read the copy back from the drive itself
Local copies read the source once with md5 and write to a partial file with the Mac’s file cache off, flush to the drive, then read the copy back from the drive and compare before it gets its real name. Drives are recognized by volume UUID, so a different disk with the same name won’t be mistaken for mine.
Instead of trusting a copy that finished
Ride through the drop-outs
If a drive disconnects during an upload, fingerprint check or copy, lens waits up to an hour for it to come back and continues. A drive that returns under a new name is found by its volume ID. Google only keeps files that finished uploading, so an interrupted upload leaves nothing half-written.
Instead of starting over by hand
How it’s built and checked
Each safety rule has a test, run on temp folders with a local folder in place of Google Drive.
- Plan first
- Every command that copies or uploads shows a plan and asks before starting.
- Nothing skipped
- Folders or files that can’t be read are reported, and a trip or copy with any of them is never marked complete.
- One at a time
- New media operations share an exclusive lock. Browsing, planning and receipts stay available while a transfer runs.
- Receipts
- Everything writes a receipt, plus a one-line history.
- Exit codes
0done,1error or refused,2finished but incomplete.
Where it stands
Works today
- Planning, uploads, md5 checks, verified local copies, drop-out recovery and receipts.
- With keep-trying on, it waits out Google’s daily limit and tries again every hour.
Held on purpose
- Real removal. A guarded implementation exists, but it stays blocked until Reef can provide complete reference coverage, and no menu checkbox or setting can turn it on.
Not yet
- Retiring the Drive app’s Computers backup once the library is verified.