Restoring files from trashbin manually

Is there a way to restore trashbin files manually without using the GUI? I get an error:

nextcloud error while removing files from trash bin

when I try to restore from the trashbin via the GUI, and it would go much faster overall as I need to restore about 7000 files due to them getting deleted by accident. I tried moving the file over, renaming it, and running a files:scan but the file seems to be corrupted somehow or not readable otherwise.

Any help would be appreciated, thanks.

bump? anyone with any suggestions?

+1
my nextcloud server have 23k files in group folder Trashbin. It’s like a nightmare, i can’t restore more than 20 files once. Is there any script out there for automatic restore?

occ trashbin:restore <USERID>
(or don’t pass USERID to restore all Users).

This doesn’t work for Group Folders at this time.

I think it is also possible to copy the files in the linux filesystem from the trash
data/username/files_trashbin/files
back to
data/username/files
and then

sudo -u www-data php occ files:scan --all
or
sudo -u www-data php occ files:scan username

documentation occ files:scan