<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Jishnu Mahanta]]></title><description><![CDATA[Jishnu Mahanta]]></description><link>https://jishnumahanta.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Tue, 03 Nov 2026 04:29:20 GMT</lastBuildDate><atom:link href="https://jishnumahanta.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[My SSD stopped mounting, so I wrote a read-only APFS rescue tool (now Retrova, free and open source)]]></title><description><![CDATA[Years of my work were on one portable SSD. One day I plugged it in and macOS refused to mount it. The drive was there, but its APFS volume wouldn't open. I…]]></description><link>https://jishnumahanta.hashnode.dev/my-ssd-stopped-mounting-so-i-wrote-a-read-only-apfs-rescue-tool-now-retrova-free-and-open-source</link><guid isPermaLink="true">https://jishnumahanta.hashnode.dev/my-ssd-stopped-mounting-so-i-wrote-a-read-only-apfs-rescue-tool-now-retrova-free-and-open-source</guid><category><![CDATA[Open Source]]></category><category><![CDATA[Python]]></category><category><![CDATA[macOS]]></category><category><![CDATA[data recovery]]></category><dc:creator><![CDATA[Jishnu Mahanta]]></dc:creator><pubDate>Thu, 29 Oct 2026 20:39:56 GMT</pubDate><content:encoded><![CDATA[<p>Years of my work were on one portable SSD. One day I plugged it in and macOS refused to mount it. The drive was there, but its APFS volume wouldn't open.</p>
<h2>The paywall</h2>
<p>I did what everyone does and searched for recovery software. Every option was a subscription or a paid licence. The free versions scanned my drive, showed me my own files, and then stopped: a 100 MB limit here, a 2 GB cap there. Pay first, then you get your files back.</p>
<p>They were my files, on my drive, and the software could clearly read them. That felt wrong.</p>
<h2>The script</h2>
<p>I'm a developer, so I started reading how APFS actually stores things. The damage was in the volume's bookkeeping, not in the files themselves.</p>
<p>So I wrote a small rescue tool that:</p>
<ol>
<li>opened the drive <strong>strictly read-only</strong>,</li>
<li>found the newest part of the file system that still held together (the newest usable checkpoint),</li>
<li>walked the folder tree from there, and</li>
<li>copied everything off.</li>
</ol>
<p>It worked. My files came back.</p>
<h2>The rules I kept</h2>
<p>A recovery tool touches someone's only copy of something, so I kept a few rules from the first script:</p>
<ul>
<li><strong>Never write to the source drive.</strong> It's opened with read-only system handles. Nothing formats, partitions or touches blocks on the damaged disk.</li>
<li><strong>Never delete for real.</strong> Anything cleaned up goes to the Trash or Recycle Bin, not <code>rm</code>.</li>
<li><strong>Never overwrite a copy.</strong> Files are written as <code>.part</code> and renamed only after they're verified. Name clashes become <code>filename.retrova-N</code>.</li>
<li><strong>Stay local.</strong> The engine binds only to <code>127.0.0.1</code> with a session token, sends no analytics, and only talks to the internet when you click <em>Check for updates</em>.</li>
</ul>
<h2>Then the questions started</h2>
<p>Getting files back was half of it. Is every copy really intact? Why is my backup drive suddenly full? Which folders are copies of each other? Each answer became a tool:</p>
<ul>
<li><strong>Verify:</strong> compare recovered copies against the original drive in Quick (name and size), Sample (head/tail hash) or Full (byte-for-byte) mode, then recopy anything that doesn't match.</li>
<li><strong>Rescue more file systems:</strong> APFS, HFS+, NTFS, FAT and exFAT, ext2/3/4, XFS and Btrfs, plus BitLocker, LUKS and FileVault volumes when you have the key.</li>
<li><strong>Deleted files with their names</strong> on NTFS, FAT and exFAT, and file carving for 72 formats (camera RAW, HEIC, PST and more) when there's no file system left.</li>
<li><strong>Careful imaging of failing drives</strong>, the way GNU ddrescue does it: save the healthy areas first, skip ahead on read errors, then come back for the damaged parts. Progress goes into a ddrescue-compatible <code>.map</code> file, so you can stop and resume.</li>
<li><strong>Reclaim space:</strong> sparse-file fixes for VM and Docker disks, APFS clones for duplicates, and a dev-cache cleaner.</li>
</ul>
<p>Together they became <strong>Retrova</strong>.</p>
<h2>How it's built</h2>
<p>It's plain Python with a no-build-step web UI. You can run it from source:</p>
<pre><code class="language-bash">python3 -m venv .venv &amp;&amp; source .venv/bin/activate
pip install -r packaging/requirements/common.txt -r packaging/requirements/mac.txt   # or win.txt
python -m retrova
</code></pre>
<p>Add <code>&amp;mock=1</code> to the URL to try the interface without touching any drive. Release builds come from GitHub Actions and carry a signed build attestation, so you can check a download with:</p>
<pre><code class="language-bash">gh attestation verify Retrova-1.1.3-mac-arm64.dmg --repo jishnumahanta/retrova
</code></pre>
<p>The builds aren't signed with a paid Apple or Microsoft certificate yet, so macOS Gatekeeper and Windows SmartScreen show a warning on first launch. The README explains how to get past it, and how to check the SHA-256.</p>
<h2>Why it's free, and open</h2>
<p>Retrova is free for anyone rescuing their own files. No trial, no account, no recovery limit. It's open source under the AGPL-3.0, because a tool you trust with your only copy of something should be one you can read: it reads, and it never writes.</p>
<ul>
<li>Download (macOS + Windows): <a href="https://retrova.jishnumahanta.in">https://retrova.jishnumahanta.in</a></li>
<li>Source: <a href="https://github.com/jishnumahanta/retrova">https://github.com/jishnumahanta/retrova</a></li>
</ul>
<p>If you've ever stared at a drive that won't open, I'd like to know what you tried first. And if Retrova saves your files, tell one friend.</p>
<p><em>— Jishnu Mahanta, independent developer in Guwahati, India</em></p>
]]></content:encoded></item></channel></rss>