a user has deleted 27000 files, 40 Go !!
All the files are in its trashbin, I can see them.
I have tried to restaure them via the web interface. It bugs after 2hours and only around 1000 files. Some of them are restored in the right folder, other are directly under the parent folder but not in the right sub-folder.
2 I do not want to restore all its trashbin but just between 2 dates (I have the timestamp).
Is it possible to do it directly via the database ? Is there a script to restore them more easily ?
Is it possible to block the deletion of a large volume of files, or ask a confirmation ?
occ trashbin:restore --help
Restore all deleted files
trashbin:restore [options] [--] [<user_id>...]
user_id restore all deleted files of the given user(s)
--output[=OUTPUT] Output format (plain, json or json_pretty, default is plain) [default: "plain"]
--all-users run action on all users
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
--no-warnings Skip global warnings, show command output only
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
unfortunately there is no option for restoring only files deleted in a certain time-window but you could first permanently delete the files that should not be restored (sort files in trashbin by time/date of deletion and select range) and then run the occ command.
Without having done this, it looks to me as one of the simpler operations.