diff --git a/admin_manual/configuration_server/occ_command.rst b/admin_manual/configuration_server/occ_command.rst index 081e5cb98da..adc0e2287a4 100644 --- a/admin_manual/configuration_server/occ_command.rst +++ b/admin_manual/configuration_server/occ_command.rst @@ -1203,7 +1203,7 @@ Trashbin trashbin trashbin:cleanup [--all-users] [--] [...] Permanently remove deleted files - trashbin:restore [--all-users] [--] [...] Restore deleted files + trashbin:restore [--all-users] [--scope[=SCOPE]] [--since[=SINCE]] [--until[=UNTIL]] [--dry-run] [--] [...] Restore deleted files according to the given filters .. note:: This command is only available when the "Deleted files" app @@ -1229,20 +1229,36 @@ This example permanently removes the deleted files of users molly and freda:: Remove deleted files of molly Remove deleted files of freda -The ``trashbin:restore [--all-users] [--] [...]`` command restores the deleted files of the specified +The ``trashbin:restore [--all-users] [--scope[=SCOPE]] [--since[=SINCE]] [--until[=UNTIL]] [--dry-run] [--] [...]`` command restores the deleted files of the specified users in a space-delimited list, or all users if --all-users is specified. -This example restores the deleted files of all users:: +This example restores the deleted user-files of all users:: sudo -u www-data php occ trashbin:restore --all-users -This example restores the deleted files of users molly and freda:: +This example restores the deleted user-files of users molly and freda:: sudo -u www-data php occ trashbin:restore molly freda + +The ``--scope`` option can be used to limit the restore to a specific scope. +Possible values are "user", "groupfolders" or "all" [default: "user"]. + +This example restores the deleted files of all groupfolders which are visible to the user freda:: + + sudo -u www-data php occ trashbin:restore --scope groupfolders freda + +The ``--since`` and ``--until`` options can be used to limit the restore to files deleted inside of the given time period. + +This example restores the locally deleted files and files of any groupfolders which are visible to the user +freda. Additionally the files have to be deleted between ``01.08.2023 11:55:22`` and ``02.08.2023 01:33``:: + + sudo -u www-data php occ trashbin:restore --scope all --since "01.08.2023 11:55:22" --until "02.08.2023 01:33" freda + +The ``--dry-run`` option can be used to simulate the restore without actually restoring the files. .. note:: - This command only restores Users deleted files. - If you're using Group Folders app, such files are not restored. + You can use the verbose options (``-v`` or ``-vv``) to get more information about + the restore process and why some files might be skipped. .. _user_commands_label: