<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: jishnu mahanta</title>
    <description>The latest articles on DEV Community by jishnu mahanta (@jishnu_mahanta_85db41b5c8).</description>
    <link>https://dev.to/jishnu_mahanta_85db41b5c8</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4216030%2Ff8cc44d5-3e34-4b1c-bde4-8a87c36a802d.png</url>
      <title>DEV Community: jishnu mahanta</title>
      <link>https://dev.to/jishnu_mahanta_85db41b5c8</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jishnu_mahanta_85db41b5c8"/>
    <language>en</language>
    <item>
      <title>My SSD stopped mounting, so I wrote a read-only APFS rescue tool (now Retrova, free and open source)</title>
      <dc:creator>jishnu mahanta</dc:creator>
      <pubDate>Thu, 29 Oct 2026 20:35:38 +0000</pubDate>
      <link>https://dev.to/jishnu_mahanta_85db41b5c8/my-ssd-stopped-mounting-so-i-wrote-a-read-only-apfs-rescue-tool-now-retrova-free-and-open-source-52b0</link>
      <guid>https://dev.to/jishnu_mahanta_85db41b5c8/my-ssd-stopped-mounting-so-i-wrote-a-read-only-apfs-rescue-tool-now-retrova-free-and-open-source-52b0</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  The paywall
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;They were my files, on my drive, and the software could clearly read them. That felt wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  The script
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;So I wrote a small rescue tool that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;opened the drive &lt;strong&gt;strictly read-only&lt;/strong&gt;,&lt;/li&gt;
&lt;li&gt;found the newest part of the file system that still held together (the newest usable checkpoint),&lt;/li&gt;
&lt;li&gt;walked the folder tree from there, and&lt;/li&gt;
&lt;li&gt;copied everything off.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It worked. My files came back.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rules I kept
&lt;/h2&gt;

&lt;p&gt;A recovery tool touches someone's only copy of something, so I kept a few rules from the first script:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Never write to the source drive.&lt;/strong&gt; It's opened with read-only system handles. Nothing formats, partitions or touches blocks on the damaged disk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never delete for real.&lt;/strong&gt; Anything cleaned up goes to the Trash or Recycle Bin, not &lt;code&gt;rm&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never overwrite a copy.&lt;/strong&gt; Files are written as &lt;code&gt;.part&lt;/code&gt; and renamed only after they're verified. Name clashes become &lt;code&gt;filename.retrova-N&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stay local.&lt;/strong&gt; The engine binds only to &lt;code&gt;127.0.0.1&lt;/code&gt; with a session token, sends no analytics, and only talks to the internet when you click &lt;em&gt;Check for updates&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Then the questions started
&lt;/h2&gt;

&lt;p&gt;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:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Verify:&lt;/strong&gt; 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.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rescue more file systems:&lt;/strong&gt; APFS, HFS+, NTFS, FAT and exFAT, ext2/3/4, XFS and Btrfs, plus BitLocker, LUKS and FileVault volumes when you have the key.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deleted files with their names&lt;/strong&gt; on NTFS, FAT and exFAT, and file carving for 72 formats (camera RAW, HEIC, PST and more) when there's no file system left.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Careful imaging of failing drives&lt;/strong&gt;, 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 &lt;code&gt;.map&lt;/code&gt; file, so you can stop and resume.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reclaim space:&lt;/strong&gt; sparse-file fixes for VM and Docker disks, APFS clones for duplicates, and a dev-cache cleaner.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Together they became &lt;strong&gt;Retrova&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it's built
&lt;/h2&gt;

&lt;p&gt;It's plain Python with a no-build-step web UI. You can run it from source:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 &lt;span class="nt"&gt;-m&lt;/span&gt; venv .venv &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;source&lt;/span&gt; .venv/bin/activate
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; packaging/requirements/common.txt &lt;span class="nt"&gt;-r&lt;/span&gt; packaging/requirements/mac.txt   &lt;span class="c"&gt;# or win.txt&lt;/span&gt;
python &lt;span class="nt"&gt;-m&lt;/span&gt; retrova
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add &lt;code&gt;&amp;amp;mock=1&lt;/code&gt; 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:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh attestation verify Retrova-1.1.3-mac-arm64.dmg &lt;span class="nt"&gt;--repo&lt;/span&gt; jishnumahanta/retrova
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it's free, and open
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download (macOS + Windows): &lt;a href="https://retrova.jishnumahanta.in" rel="noopener noreferrer"&gt;https://retrova.jishnumahanta.in&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Source: &lt;a href="https://github.com/jishnumahanta/retrova" rel="noopener noreferrer"&gt;https://github.com/jishnumahanta/retrova&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;— Jishnu Mahanta, independent developer in Guwahati, India&lt;/em&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>python</category>
      <category>macos</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
