Recover accidentally deleted directory

Hi

I have a NAS326 device with 2 disks,using RAID1

I accidentally deleted a directory using the web interface, there was no recycle bin enabled.

On desktop I use Win10, I use the NAS only as a file server.

I stopped the NAS remotely, I'm on a holiday abroad.

Could you suggest a good way to recover this directory?

Accepted Solution

  • Zyxel_Kay
    Zyxel_Kay Posts: 989  Zyxel Employee
    Zyxel Certified Network Engineer Level 2 - Nebula Zyxel Certified Network Engineer Level 2 - WLAN Zyxel Certified Network Engineer Level 2 - Switch Zyxel Certified Network Engineer Level 2 - Security
    Answer ✓

    Hi @keep2000

    If the recycle bin function wasn’t enabled, unfortunately, once a file or folder is deleted, it cannot be recovered directly from the device.

    To prevent accidental deletions in the future, we recommend enabling the recycle bin function. This will help ensure that deleted files or folders can be recovered if necessary.

    Kay

    Engage in the Community, become an MVP, and win exclusive prizes! https://bit.ly/Community_MVP

All Replies

  • Mijzelf
    Mijzelf Posts: 2,751  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary

    The used filesystem, ext4, is not designed to 'undelete' files. Best solution would be if you can recover the directory from a backup.

    But if not, do not switch on the NAS. Take the disks out, and connect them to a Linux box. Assemble the raid array, but do not mount the volume. Then use extundelete.

    If that fails, AFAIK the only option is to use PhotoRec, or a similar tool. That is a program which scans the whole surface for recognizable file headers, to recover that files. Which means that only files with a recognizable header can be recovered. Nowadays most document files are in that category, and media files. But not raw photo's, and plain text files.

    As it doesn't use the filesystem, it cannot recover filenames or timestamps. It cannot handle fragmented files. It doesn't know if a file is deleted or not, so it will write anything it can find to another medium. You can only filter on type.

  • Zyxel_Kay
    Zyxel_Kay Posts: 989  Zyxel Employee
    Zyxel Certified Network Engineer Level 2 - Nebula Zyxel Certified Network Engineer Level 2 - WLAN Zyxel Certified Network Engineer Level 2 - Switch Zyxel Certified Network Engineer Level 2 - Security
    Answer ✓

    Hi @keep2000

    If the recycle bin function wasn’t enabled, unfortunately, once a file or folder is deleted, it cannot be recovered directly from the device.

    To prevent accidental deletions in the future, we recommend enabling the recycle bin function. This will help ensure that deleted files or folders can be recovered if necessary.

    Kay

    Engage in the Community, become an MVP, and win exclusive prizes! https://bit.ly/Community_MVP

Consumer Product Help Center