Next Cloud Pi - Deleted Data - How to Recover

Hello all,

I am Using NextCloudPi Version v1.34.7 with an Raspberry Pi 4.

I made a mistake by deleting a big amount (around 500GB) of videos from my external storange (at my desktop PC) which is connected to the NextCloud storage. The cloud storage synchronised and the videos also were delted on NextCloud.
The format of the Cloud storage is Ext4.

Nextcloud version: 1.34.7
Operating system and version: Debian GNU/Linux 10 \n \l
Apache or nginx version: don’t know
PHP version: 7.3.27-1

I saw the button on NextCloud which was like “deleted data”. I opened it and there I was able to see all deleted videos. I selected all and wanted to restore them. While processing a error massage poped up and said s.th. like: There was a failure while restoring". Since this moment I can not see any deleted data anymore. The folder is now empty.

I disconected the Cloud storage and connected it to my desktop PC. I installed “Stellar Data Recovery” and started the restoring process. It took around 15 hours and ended with the massage, that there are no files to recover.

I also restored a big amount of data from the external storage at my desktop PC, but I am missing some.

My question: Is there a software tool which can read the Ext4 format and can restore the missing data of the external storage of the NextCloud or is there any possiblity to use the NextCloudPi Gui to restore it?

I am very new in this topic and I would appriciate any help you can give me!

Best regards
Aorkon

If you look around with, there are tools such as extundelete but I have not experience myself and just used the search engine. I’d make sure the tools used are compatible with ext4 and best is to use the drive read only that the data is not overwritten by accident.

For Nextcloud, you can check the main data folder where there is the trashbin for each users. But the size depends on the main storage capacity and the user’s quota. It’s perhaps in the trashbin of the user that mounted the external storage.

it would probably be best to first create a raw image of the disk/partition that contains the deleted data; you can use dd, ddrescue or dd_rescue; plain dd will do if the disk/partition/fs is not damaged.
you can then work on the imagefile(s) with tool like photorec which scan for known file-patterns and can usually find a lot of stuff if the disk was not modified. photorec will give the resulting files “random” names (since the filename is part of the directory and not of the file itself) but with some luck you can reconstruct it from the files’ metadata.
GOOD LUCK!