Skip to content

Commit f154b52

Browse files
authored
Merge pull request #14939 from nextcloud/fix/updater-cli-before-web
docs: show CLI updater before web updater in update.rst
2 parents 3ffe4e9 + b6b9e97 commit f154b52

1 file changed

Lines changed: 96 additions & 98 deletions

File tree

admin_manual/maintenance/update.rst

Lines changed: 96 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -69,105 +69,9 @@ The built-in updater performs these operations:
6969
linked page or to the command line to finish the upgrade by executing the
7070
migration steps.
7171

72-
Using the web based updater
73-
---------------------------
74-
75-
Using the built-in updater to update your Nextcloud installation is just a few
76-
steps:
77-
78-
1. You should see a notification at the top of any Nextcloud page when there is
79-
a new update available. Go to the admin settings page and scroll to the
80-
section "Version". This section has a button to open the updater. This
81-
section as well as the update notification is only available if the update
82-
notification app is enabled in the apps management.
83-
84-
.. figure:: images/updater-1-update-available.png
85-
86-
2. Click the button "Open updater".
87-
88-
.. figure:: images/updater-2-open-updater.png
89-
90-
3. Verify the information that is shown and click the button "Start update"
91-
to start the update.
92-
93-
.. figure:: images/updater-3-running-step.png
94-
95-
4. In case an error happens or the check failed the updater stops processing
96-
and gives feedback. You can now try to solve the problem and click the
97-
"Retry update" button. This will continue the update and re-run the failed
98-
step. It will not re-run the previous succeeded steps.
99-
100-
.. figure:: images/updater-4-failed-step.png
101-
102-
5. In case you close the updater, before it finished you can just open the
103-
updater page again and proceed at the last succeeded step. Closing the web
104-
page will still execute the running step but will not continue with the next
105-
one, because this is triggered by the open updater page.
106-
107-
.. figure:: images/updater-5-continue-update.png
108-
109-
6. Once all steps are executed the updater will ask you a final question:
110-
"Keep maintenance mode active?". This allows you to use either the web based
111-
upgrade page or the command line based upgrade procedure (``occ upgrade``).
112-
Command line access is required if the maintenance mode is kept active.
113-
114-
.. figure:: images/updater-6-maintenance-mode.png
115-
116-
7. Done. You now can continue either to the web based upgrade page or run
117-
``occ upgrade``. The two examples "Web based upgrade" and "Command line
118-
based upgrade" shows how the screens then look like.
119-
120-
121-
**Web based upgrade**
122-
123-
This is how the web based update would continue:
124-
125-
.. image:: images/updater-7-disable-maintenance.png
126-
:alt: Nextcloud web updater showing option to disable maintenance mode after upgrade
127-
128-
.. image:: images/updater-9-upgrade-page.png
129-
:alt: Nextcloud upgrade page displayed after the web updater completes
130-
131-
**Command line based upgrade**
132-
133-
This is how the command line based update would continue:
134-
135-
.. image:: images/updater-8-keep-maintenance.png
136-
:alt: Nextcloud command line updater asking whether to keep maintenance mode active
137-
138-
139-
.. code::
140-
141-
$ sudo -u www-data php ./occ upgrade
142-
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
143-
You may use your browser or the occ upgrade command to do the upgrade
144-
Set log level to debug
145-
Updating database schema
146-
Updated database
147-
Updating <files_pdfviewer> ...
148-
Updated <files_pdfviewer> to 1.1.1
149-
Updating <gallery> ...
150-
Updated <gallery> to 17.0.0
151-
Updating <activity> ...
152-
Updated <activity> to 2.5.2
153-
Updating <comments> ...
154-
Updated <comments> to 1.2.0
155-
Updating <theming> ...
156-
Updated <theming> to 1.3.0
157-
Starting code integrity check...
158-
Finished code integrity check
159-
Update successful
160-
Maintenance mode is kept active
161-
Reset log level
162-
16372
Using the command line based updater
16473
------------------------------------
16574

166-
The command line based updater works in the exact same way the web based
167-
updater works. The steps and checks are the very same.
168-
169-
The steps are basically the same as for the web based updater:
170-
17175
1. You should see a notification at the top of any Nextcloud page when there is
17276
a new update available. Go to the admin settings page and scroll to the
17377
section "Version". This section has a button to open the updater. This
@@ -180,7 +84,7 @@ The steps are basically the same as for the web based updater:
18084
2. Instead of clicking that button you can now invoke the command line based
18185
updater by going into the `updater/` directory in the Nextcloud directory
18286
and executing the `updater.phar` as the web server user. (i.e.
183-
``sudo -u www-data php /var/www/nextcloud/updater/updater.phar``)
87+
``sudo -E -u www-data php /var/www/nextcloud/updater/updater.phar``)
18488

18589
.. image:: images/updater-cli-2-start-updater.png
18690
:alt: Terminal showing Nextcloud command line updater starting and displaying update information
@@ -233,7 +137,7 @@ except an error occurred during the ``occ upgrade`` or the replacement of the
233137
code.
234138

235139
To execute this, run the command with the ``--no-interaction`` option. (i.e.
236-
``sudo -u www-data php /var/www/nextcloud/updater/updater.phar --no-interaction``)
140+
``sudo -E -u www-data php /var/www/nextcloud/updater/updater.phar --no-interaction``)
237141

238142
.. image:: images/updater-cli-8-no-interaction.png
239143
:alt: Terminal showing Nextcloud command line updater running in non-interactive batch mode
@@ -326,6 +230,100 @@ runs:
326230
--signature "BASE64_SIGNATURE_HERE" \
327231
--no-interaction
328232
233+
Using the web based updater
234+
---------------------------
235+
236+
The web based updater performs the same steps and checks as the command line
237+
based updater.
238+
239+
Using the built-in updater to update your Nextcloud installation is just a few
240+
steps:
241+
242+
1. You should see a notification at the top of any Nextcloud page when there is
243+
a new update available. Go to the admin settings page and scroll to the
244+
section "Version". This section has a button to open the updater. This
245+
section as well as the update notification is only available if the update
246+
notification app is enabled in the apps management.
247+
248+
.. figure:: images/updater-1-update-available.png
249+
250+
2. Click the button "Open updater".
251+
252+
.. figure:: images/updater-2-open-updater.png
253+
254+
3. Verify the information that is shown and click the button "Start update"
255+
to start the update.
256+
257+
.. figure:: images/updater-3-running-step.png
258+
259+
4. In case an error happens or the check failed the updater stops processing
260+
and gives feedback. You can now try to solve the problem and click the
261+
"Retry update" button. This will continue the update and re-run the failed
262+
step. It will not re-run the previous succeeded steps.
263+
264+
.. figure:: images/updater-4-failed-step.png
265+
266+
5. In case you close the updater, before it finished you can just open the
267+
updater page again and proceed at the last succeeded step. Closing the web
268+
page will still execute the running step but will not continue with the next
269+
one, because this is triggered by the open updater page.
270+
271+
.. figure:: images/updater-5-continue-update.png
272+
273+
6. Once all steps are executed the updater will ask you a final question:
274+
"Keep maintenance mode active?". This allows you to use either the web based
275+
upgrade page or the command line based upgrade procedure (``occ upgrade``).
276+
Command line access is required if the maintenance mode is kept active.
277+
278+
.. figure:: images/updater-6-maintenance-mode.png
279+
280+
7. Done. You now can continue either to the web based upgrade page or run
281+
``occ upgrade``. The two examples "Web based upgrade" and "Command line
282+
based upgrade" shows how the screens then look like.
283+
284+
285+
**Web based upgrade**
286+
287+
This is how the web based update would continue:
288+
289+
.. image:: images/updater-7-disable-maintenance.png
290+
:alt: Nextcloud web updater showing option to disable maintenance mode after upgrade
291+
292+
.. image:: images/updater-9-upgrade-page.png
293+
:alt: Nextcloud upgrade page displayed after the web updater completes
294+
295+
**Command line based upgrade**
296+
297+
This is how the command line based update would continue:
298+
299+
.. image:: images/updater-8-keep-maintenance.png
300+
:alt: Nextcloud command line updater asking whether to keep maintenance mode active
301+
302+
303+
.. code::
304+
305+
$ sudo -u www-data php ./occ upgrade
306+
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
307+
You may use your browser or the occ upgrade command to do the upgrade
308+
Set log level to debug
309+
Updating database schema
310+
Updated database
311+
Updating <files_pdfviewer> ...
312+
Updated <files_pdfviewer> to 1.1.1
313+
Updating <gallery> ...
314+
Updated <gallery> to 17.0.0
315+
Updating <activity> ...
316+
Updated <activity> to 2.5.2
317+
Updating <comments> ...
318+
Updated <comments> to 1.2.0
319+
Updating <theming> ...
320+
Updated <theming> to 1.3.0
321+
Starting code integrity check...
322+
Finished code integrity check
323+
Update successful
324+
Maintenance mode is kept active
325+
Reset log level
326+
329327
Troubleshooting
330328
---------------
331329

0 commit comments

Comments
 (0)