Sorry to hear that, if you’re using Linux then I suggest using a file system called BTRFS. It keeps Snapshots and it’s extremely robust. If you set it up to use RAID 10 then you’re very unlikely to lose data.
I suggest running “journalctl -f” to see any failures or looking through logs. If there’s something causing drives to become corrupt then you want to pick that up as soon as possible!!