Recover deleted files on Synology NAS

Hello all,

I accidently deleted some files and folders on my Synology NAS via rsync and have no backup, of course :innocent:

Was experimenting with rsync and set the --delete switch, which was a mistake because on the source I deleted a directory (don’t know why) and I couldn’t react fast enough to stop the deletion.

  • wanted to sync a folder with family photos and employment stuff on my PC to a new folder on NAS, using “rsync”
  • somehow set the --delete switch and did something wrong (don’t know what exactly, some days have passed)
  • NAS itself features backup functionality, but I use it as a plain network storage (ranger and terminal), so no backup functionality is set up. No special features used.
  • some hours later I thought it would be better to shut down the NAS to stop the NAS system itself from working on the disks, but didn’t do much to no writing on the NAS until then.
  • NAS is turned off now to prevent it’s own system from doing maintenance writings.

It is a DS218j, two disks installed as mirrored RAID, ext4 i believe. Used the web interface two years ago to initialize the RAID and believe it is an ext4.

  • NAS has 2 HDDs installed with 4 TB each
  • Took one HDD out and connected to PC via SATA to USB adapter. My hope is, as it is a mirrored RAID, that both disks contain the same data and I can connect one disk to scan for deleted files and maybe recover them.
  • disk is not mounted, so even if its motor runs no writing should be done
  • gparted shows 1.64 TB as not assigned, no partition visible

What should I do?

Thanks in advance!

If you’re gonna use the --delete flag, you should get into the habit of adding the --dry-run flag to see what it will do without actually performing the sync.