Skip to content

Commit

Permalink
Doc adjustments for occ trashbin:restore
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <[email protected]>
  • Loading branch information
R0Wi authored Aug 14, 2023
1 parent bb6d601 commit 8277647
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions admin_manual/configuration_server/occ_command.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ Trashbin

trashbin
trashbin:cleanup [--all-users] [--] [<user_id>...] Permanently remove deleted files
trashbin:restore [--all-users] [--] [<user_id>...] Restore deleted files
trashbin:restore [--all-users] [--scope[=SCOPE]] [--since[=SINCE]] [--until[=UNTIL]] [--dry-run] [--] [<user_id>...] Restore deleted files according to the given filters

.. note::
This command is only available when the "Deleted files" app
Expand All @@ -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] [--] [<user_id>...]`` command restores the deleted files of the specified
The ``trashbin:restore [--all-users] [--scope[=SCOPE]] [--since[=SINCE]] [--until[=UNTIL]] [--dry-run] [--] [<user_id>...]`` 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:

Expand Down

0 comments on commit 8277647

Please sign in to comment.