Accidentally deleted a bunch of files from within Vault

I have my vault mount to ~/.files. While trying to delete ~/.fonts, I accidentally deleted ~/.files. I stopped the process ASAP, and check on my Nextcloud (the vault is hosted on Nextcloud).

My Nextcloud trashbin has about ~1000 folders all which were deleted then, but since Nextcloud is super buggy it can’t handle restoring all of them at once (also, my instance is slow, and the trashbin has loads of other files I don’t want to restore so I’d have to manually select all the items I’d want to restore, which would take forever).

The only thing I can think of doing is manually clicking restore on each file/folder, syncing to my Nextcloud again, re-downloading the encrypted files that were deleted, and then seeing if Cryptomator will open the vault and show me all the files.

Is there any point is me doing that, or does Cryptomator not work in this way? If not, I’ll just have to accept that all those files are lost forever, I suppose. Which isn’t catastrophic, I have backups of the most important notes, but I’d hope it wasn’t the case.

Does the restore option put the files back into the original directory structure? Because that’s quite important in Cryptomator. The encrypted filenames are “bound” to the directory structure. If it puts the files back into the correct directory, I guess you could restore them one-by-one. Otherwise you could still do that and use Sanitizer with its decryptVault option to restore the files but you should be aware that the filenames can’t be restored in this case.

Does the restore option put the files back into the original directory structure?

afaik, yes it does.

Otherwise you could still do that and use Sanitizer with its decryptVault option to restore the files but you should be aware that the filenames can’t be restored in this case.

Thanks for this, didn’t know it existed. I’ve just used it, and I have a lost+found folder that contains 150+ folders, and within those are some of my “lost” files – so that’s a start.

I guess my question now is the following: how do I tell what data has actually been deleted then? It’d be a lot easier for me to work through this lost+found data and organise it (renaming the files etc.) than restoring the deleted files through Nextcloud, so if it’s all there and all that was deleted was metadata, I’m okay with that. Is there a way to tell?

You won’t find any files in lost+found that have been deleted. If it’s deleted, it should be gone. (I guess due to some faulty sync, it might be possible to find deleted files in lost+found but that should be very very rare.) That’s why you’d need to restore deleted files via Nextcloud. The more you recover, the less files should be inside lost+found.

Right, yeah I stopped the deleting process mid-way and also prevented a full sync from occurring. I’ll get to recovering my files now, thanks so much for your help