diff --git a/admin_manual/configuration_server/occ_command.rst b/admin_manual/configuration_server/occ_command.rst index 40f2bd5d0cf..0741335e7f0 100644 --- a/admin_manual/configuration_server/occ_command.rst +++ b/admin_manual/configuration_server/occ_command.rst @@ -16,6 +16,7 @@ occ command Directory --------------------- * :ref:`http_user_label` +* :ref:`run_commands_in_maintenance_mode` * :ref:`apps_commands_label` * :ref:`background_jobs_selector_label` * :ref:`config_commands_label` @@ -186,6 +187,25 @@ you need to specify ``--program occ`` after the ``--generate-hook``. If you want the completion to apply automatically for all new shell sessions, add the command to your shell's profile (eg. ``~/.bash_profile`` or ``~/.zshrc``). +.. _run_commands_in_maintenance_mode: + +Run commands in maintenance mode +-------------------------------- + +In maintenance mode, no apps are loaded [1]_. + +Commands provided by apps are not available. + +The commands, available in maintenance mode, are integrated in Nextcloud server. +A command may use events to communicate with other apps. An app can only react to an event when loaded. + +Example: The command `user:delete` deletes a user account. UserDeletedEvent is emitted. Calendar app implements an event listener to delete user data [2]_. In maintenance mode, the Calendar app is not loaded, and hence the user data not deleted. + +Consider running such commands with maintenance mode off. + +.. [1] Exception: `The settings app is loaded `_ +.. [2] `Calendar app event listener for UserDeletedEvent `_ + .. _apps_commands_label: Apps commands @@ -606,10 +626,7 @@ user:: sudo -u www-data php occ encryption:decrypt freda -Users must have enabled recovery keys on their Personal pages. You must first -put your Nextcloud server into :ref:`maintenance -mode ` to prevent any user activity until -decryption is completed. +Users must have enabled recovery keys on their Personal pages. Note that if you do not have master key/recovery key enabled, you can ONLY decrypt files per user, one user at a time and NOT when in maintenance mode. @@ -1151,6 +1168,7 @@ This example restores the deleted files of users molly and freda:: User commands ------------- +.. note:: Read :ref:`run_commands_in_maintenance_mode` if you intend to use a user command in maintenance mode. The ``user`` commands create and remove users, reset passwords, display a simple report showing how many users you have, and when a user was last logged in:: @@ -1281,6 +1299,8 @@ authentication servers such as LDAP:: Group commands -------------- +.. note:: Read :ref:`run_commands_in_maintenance_mode` if you intend to use a group command in maintenance mode. + The ``group`` commands create and remove groups, add and remove users in groups, display a list of all users in a group::