You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: admin_manual/configuration_server/occ_command.rst
+24-4Lines changed: 24 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ occ command Directory
16
16
---------------------
17
17
18
18
* :ref:`http_user_label`
19
+
* :ref:`run_commands_in_maintenance_mode`
19
20
* :ref:`apps_commands_label`
20
21
* :ref:`background_jobs_selector_label`
21
22
* :ref:`config_commands_label`
@@ -186,6 +187,25 @@ you need to specify ``--program occ`` after the ``--generate-hook``.
186
187
If you want the completion to apply automatically for all new shell sessions, add the command to your
187
188
shell's profile (eg. ``~/.bash_profile`` or ``~/.zshrc``).
188
189
190
+
.. _run_commands_in_maintenance_mode:
191
+
192
+
Run commands in maintenance mode
193
+
--------------------------------
194
+
195
+
In maintenance mode, no apps are loaded [1]_.
196
+
197
+
Commands provided by apps are not available.
198
+
199
+
The commands, available in maintenance mode, are integrated in Nextcloud server.
200
+
A command may use events to communicate with other apps. An app can only react to an event when loaded.
201
+
202
+
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.
203
+
204
+
Consider running such commands with maintenance mode off.
205
+
206
+
.. [1] Exception: `The settings app is loaded <https://github.com/nextcloud/server/blob/75f17b60945e15effc3eea41393eef2b13937226/lib/base.php#L780>`_
207
+
.. [2] `Calendar app event listener for UserDeletedEvent <https://github.com/nextcloud/calendar/blob/87e8586971a8676dc15a90f0cd969274678b7009/lib/Listener/UserDeletedListener.php>`_
208
+
189
209
.. _apps_commands_label:
190
210
191
211
Apps commands
@@ -606,10 +626,7 @@ user::
606
626
607
627
sudo -u www-data php occ encryption:decrypt freda
608
628
609
-
Users must have enabled recovery keys on their Personal pages. You must first
610
-
put your Nextcloud server into :ref:`maintenance
611
-
mode <maintenance_commands_label>` to prevent any user activity until
612
-
decryption is completed.
629
+
Users must have enabled recovery keys on their Personal pages.
613
630
614
631
Note that if you do not have master key/recovery key enabled, you can ONLY
615
632
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::
1151
1168
1152
1169
User commands
1153
1170
-------------
1171
+
.. note:: Read :ref:`run_commands_in_maintenance_mode` if you intend to use a user command in maintenance mode.
1154
1172
1155
1173
The ``user`` commands create and remove users, reset passwords, display a simple
1156
1174
report showing how many users you have, and when a user was last logged in::
@@ -1281,6 +1299,8 @@ authentication servers such as LDAP::
1281
1299
Group commands
1282
1300
--------------
1283
1301
1302
+
.. note:: Read :ref:`run_commands_in_maintenance_mode` if you intend to use a group command in maintenance mode.
1303
+
1284
1304
The ``group`` commands create and remove groups, add and remove users in
0 commit comments