A few weeks ago, a colleague asked if I still had a document from when we worked together at CREDO. It was from 2020. I ran one search and found it almost immediately: the thread, the attachment, the whole conversation. That’s one email out of 1.2 million, all backed up to a drive in my office.
I’m not really a developer. Claude Code did the hard parts.
Why 1.2 million
I have three accounts:
- Personal Gmail: 446,000 messages, covering twenty years of personal and work life.
- A volunteer organization I’ve run since 1994: 775,000 messages. It’s an online creative writing community, and that’s three decades of its history.
- iCloud: about 2,000 messages.
If you’ve had Gmail since the mid-2000s, I’d bet you’re sitting on hundreds of thousands of messages too. Most of it is noise. But every important conversation and every document someone sent you is in there somewhere.
Why I backed it up
Google can lock you out at any time. Its automated systems flag accounts for reasons that are often unclear, and the appeals process is famously unhelpful. People lose their email, contacts, photos and Drive with no human to call.
I wasn’t comfortable with twenty years of client work and thirty years of community history being one automated decision away from gone. So I wanted my email on a drive in my office, where Google’s terms of service don’t apply.
The backup
I used got-your-back (GYB) for the Gmail accounts and mbsync for iCloud. Both are open-source command-line tools. I described what I wanted, and Claude Code wrote the scripts and set up the schedule.
Everything lands on a Kingston XS1000 SSD plugged into my Mac Mini. The first backup was big: about 36GB for personal Gmail and 28GB for the volunteer account. After that, a daily run at 3am grabs only new messages and usually finishes in a few minutes.
A second copy syncs to my Synology NAS every night, so a dead SSD doesn’t lose anything. And a monitor warns me if any of the three backups goes more than two days without updating.
The search
The backup protects the mail. Search is what makes it useful.
I use notmuch, which indexes all 1.2 million messages. I can search by sender, subject, date range or any word in any email:
notmuch search "from:colleague subject:CREDO date:2019..2021"
notmuch search "path:jordan-gmail/** ActionKit invoice"
notmuch search "roofer date:2024-01-01..2024-12-31"
The big advantage over Gmail’s search isn’t speed. It’s that notmuch searches all three accounts as one archive. And it runs on my own drive, so I don’t depend on Gmail’s search, which is inconsistent at best on a large account.
Claude Code also wrote a helper script for my common searches. I tell it what I’m looking for in plain English, and it runs the right query.
The daily digest
After the backup finishes each morning, a script scans the last 36 hours of email. It filters out noise like receipts, status alerts and marketing. Then it writes a short summary, with client emails waiting for a reply at the top.
When I sit down to work, I say “check my email.” Claude reads the digest, compares it with my active projects, and tells me what needs my attention. Most mornings I don’t even open Gmail anymore.
If you point an AI at your email, be careful. Email is untrusted content: anyone can send you anything, including text written to manipulate an AI that reads it. My digest script strips invisible characters and hidden content, and it neutralizes anything that looks like instructions to an AI. It also marks the email text so Claude treats it as data, not commands.
Was it worth it?
I haven’t been locked out of Gmail. Hopefully I never will be. But twenty years of email went from something I could technically reach to something I can actually use.
A Kingston SSD costs about $65. The software is free. And when a colleague asks “do you still have that thing from 2020?” the answer is yes.
More in my Building in Public series.
