How to recover accidentally deleted files on a NAS? Don't panic if the recycle bin is empty—I've personally tested and found the path to snapshots

one night last autumn, I was organizing photos on my NAS and saw a folder called "To Organize - Wife's Phone," 62GB. I thought it was old material from the phone's automatic backup recycling, and I right-clicked it in the Windows-mapped network drive to delete it. Seeing it go into the recycle bin, I got a bit obsessive and cleared it too—since it's all repetitive after all, why bother occupying the tray?
the next morning, my wife asked me: Where did she put those photos and videos she brought over with her new phones?
I felt a chill down my spine, remembering it wasn't a duplicate directory, but the only original backup on her old phone. The new phone only had a few hundred files I had picked out and transferred to save.
how I managed to get it back: twenty minutes before and after, I lost a dinner photo
and after calming down, the first thing I did wasn't to click everywhere, but to think: my photo plate was originally from Btrfs. This is thanks to the night I researched when choosing the file system (ext4 Btrfs that time), Btrfs brought snapshots, and my snapshot plan was to take one per hour and keep 48.
deletion happened at 10:40 PM. I logged into the backend at 8 a.m. and found the snapshot from 10 PM the previous day. The entire "To Be Organized - Wife's Phone" folder was lying there as is, with all 62GB there. Copy the entire directory back to the official directory, taking twenty minutes in total.
price was the last dinner photo, taken at 22:20, not in the 22:00 snapshot, and not saved on my phone. My wife kept talking about it for half a month.
a detail: at first, I wasn't sure what time I deleted it. Later, I flipped through my phone album and saw that the dinner photo was stamped at 22:20. Going back, the deletion action was around 22:40, and then I picked the snapshot version to get the idea. What was deleted, what was deleted? The earlier you think of these two pieces of information, the faster you'll be able to flip through snapshots later. After
this, I changed my snapshot retention strategy: one per hour, 48 left, plus one per day for 14 days. When it comes to accidental deletion, the later you discover it, the more fatal it gets. The longer the retention period, the more errors you can tolerate.
first clarify: the process from which files were deleted can lead to completely different outcomes
Many people think NAS has a unified recycle bin, where everything is deleted. No, that's not it. The Recycle Bin is a feature that attaches according to protocol. The way you delete it determines whether the file is still intact:
| deletion | go into the Recycle Bin or |
| Windows in the Mac Mapping Disk or Network Neighbor | (provided the Recycle Bin is opened |
| NAS delete from the web file manager | Synology goes to #recycle, Feiniu can delete from the settings |
| App album (Feiniu Album/Synology Photos | ). Most delete directly, do not enter |
| SSH terminal RM and FTP are deleted | and cannot be accessed, directly permanently deleted |
Synology's official knowledge base clearly states: the recycle bin is mainly attached to shared protocols like SMB, File Deleted from Station will also be included; But typing RM in SSH is a filesystem-level operation that bypasses everything; deleting is deleting. So the better you are at SSH, the less insurance you have in hand.
one more reminder: For accounts of elderly or children, limit permissions if possible. Create directories that only allow reading and writing, not deletion. How to define permissions is I wrote about before. My mother-in-law can only put things in the 'upload area' now; she can't access the photo library.
First stop: Recycle Bin. This is the 90% misunderstanding. At this point
Synology switch is in the Control Panel → Shared Folder→ edit → check "Enable Recycle Bin." After checking it, everything deleted from the shared protocol is stored in the #recycle directory under the shared folder. You can see it in File Station, and right-click to restore it to go back.
DSM7 can also set an automatic cleaning cycle for the recycle bin; mine set it to 30 days. Here's my personal experience: always leave the recycle bin empty to the automatic cycle, don't click manually. At that time, I just saw the recycle bin taking up dozens of gigabytes and felt an itch to clear it with one click, personally pouring out the regret pill. It's not like there's not enough for a plate, so why rush? Later, I did the math: the recycle bin only takes up seven or eight percent of the photo library's space. Trading that space for a 30-day regret period is a win, no matter how you calculate it.
Feiniu, starting from version 0.8.32, the "File Management" settings added a "Delete File Preferences," allowing you to customize deleting files from external devices mounted on shared protocols like SMB, without putting them in the Recycle Bin. Older versions may not be available by default. After upgrading, you have to check this box yourself; otherwise, deleting things from the Windows mirroring disk is just bare deletion. This is a pretty new feature, and many people don't know about it.
second stop: Snapshots. They only appear when the recycle bin is empty
The only prerequisite for snapshots is that the storage pool is Btrfs. ext4 doesn't have snapshots. This is the most practical difference between the two file systems—not the numbers on the parameter table, but whether you can sleep on the night of the incident.
Synology, install Snapshot Replication in the package center and set up snapshot schedules for shared folders. There are three routes during the rescue, all simpler than you might think:
- the package under "Snapshot → Browsing," directly flip through old versions, find the file, copy or restore it
- File In Station, check the #snapshot directory under the shared folder, where snapshots from previous generations are arranged by time. Manually copy the file from the right-click file in
- Windows → "Previous versions." The snapshot will appear here as mounted. The graphical interface is the most user-friendly
Feiniu storage space after selecting Btrfs, you can also browse snapshots in file management. You can copy files from the snapshot at the corresponding time point in time, following the same logic.
snapshots are usually a bit of a niche (for me, snapshots are about 7% permanent on my side), but it doesn't just save accidental deletions. Ransomware fully encrypted the files, and snapshots could still roll back to before the virus— when the NAS was three gates, the snapshot was the first step.
both sites failed: ext4 users' last backup plan. If you chose ext4 back then
, have no snapshots, the recycle bin is closed or already cleared, and the files are actually deleted, there's still one step to take, but the success rate depends on luck.
first thing: stop writing. The deleted files and data are still lying on the drive, but the directory denies them; When new data is written in, every patch you overwrite permanently loses a bit. The moment you notice a mistaken deletion, go through the stop list one by one: pause all pending tasks in the downloader, disconnect the auto-backup of your phone's photo album first, exit the sync software running this shared directory on your computer, and freeze the container in Docker that writes to disks. If the hard drive light is still flashing, it means it's not fully turned off. If I had kept dumping things inside, not even a god could have saved me.
then there's data recovery software like R-Studio or DiskGenius. Remove the disk and hang it on your computer to scan. On forums, someone accidentally deleted an ext4 drive on Feiniu and used R-Studio to retrieve it. Using normal list mode to scan reveals empty 0-byte shells. Switching to "file classification" scans only retrieves content, but the file name and directory structure are all lost, so you have to reorganize them yourself. Two iron rules: don't install recovery software on the affected drive, and don't restore files you recover from the original drive.
you can't get it back, don't rush to admit defeat. Think about whether there are other instances—synced to your computer, on a cloud drive, or on an old hard drive. By the way, syncing is not the same as backup. Deleting a sync drive can be contagious, and I've fallen into Drive syncing pitfalls; The proper backup approach is still the 3-2-1 setup. how to prepare old articles have their own records.
Taking the Fact: What do you do in the first five minutes after accidentally deleting something
Arrange the order in a table, and if something really happens, follow the rules. Don't just click on instinct
| what situation are you | what did you do in the first five minutes |
| mapped disk/network neighbor deleted | just dig through the NAS recycle bin and restore the |
| the Recycle Bin is empty, but the disk is Btrfs | to flip the snapshot. Copy back to the |
| drive at the time of the time. If the snapshot is missing | , immediately stop all writes, and the disk will crash and the computer will run recovery software. HTML136__ |
| SSH deleted by RM | same as above, RM doesn't go to the recycle bin, but goes straight into the worst-case scenario |
After recovering it, do two things: open both the recycle bin and snapshots, Also, keep an offline backup for yourself. NAS drives get bigger and bigger, and the damage from a single accidental deletion doubles. The Recycle Bin and snapshots are free system features, so spending ten minutes to set them up is much more cost-effective than spending an entire night trying to get lucky after an incident.
