Skip to content

Commit 6b8ee24

Browse files
Merge pull request #12041 from nextcloud/backport/12021/stable29
[stable29] fix(admin): Various Upgrade doc refinements
2 parents 0eac900 + 75bf62b commit 6b8ee24

3 files changed

Lines changed: 98 additions & 31 deletions

File tree

admin_manual/maintenance/manual_upgrade.rst

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,26 @@
22
Upgrade manually
33
================
44

5-
.. seealso::
6-
7-
If you upgrade from a previous major version please see :ref:`critical changes<critical-changes>`
8-
first.
5+
Overview
6+
--------
7+
8+
In some environments using the Built-in Updater in Web mode is not reliable (such as due to web server
9+
timeouts) and running it in command-line mode is not an option (such as in some shared hosting environments).
10+
In these cases a manual upgrade may be the best approach.
11+
12+
A manual upgrade consists of downloading and unpacking the Nextcloud Archive file either to your PC or host. Then
13+
deleting your existing Nextcloud Server installation files and folders, **except ``data/`` and ``config/``**, on
14+
your host. Then moving the new Nextcloud Server installation files into the appropriate place on your host,
15+
again preserving your existing ``data/`` and ``config/`` files. And doing a few other housekeeping items, such as
16+
making sure your installed apps are transferred into the new installation and adjusting permissions. That may sound
17+
like a lot, but detailed instructions are below.
18+
19+
.. important::
20+
Before upgrading, especially between major versions (e.g. v27.y.z -> v28.y.z) please review
21+
:ref:`critical changes<critical-changes>` first. These are highlights of changes that may be required
22+
in your environment to accomodate changes in Nextcloud Server. These notes are periodically revised as
23+
needed so it is a good idea to revisit them even when proceeding with minor and maintenance upgrades just
24+
in case.
925

1026
.. warning::
1127

@@ -14,6 +30,10 @@ Upgrade manually
1430
following the standard :doc:`upgrade requirements <./upgrade>` (such as upgrading to
1531
the latest maintenance release *before* upgrading to a new major release).
1632

33+
34+
Step-by-Step Manual Upgrade
35+
---------------------------
36+
1737
.. important:: Always start by making a fresh backup and disabling all 3rd party apps.
1838

1939
1. Back up your existing Nextcloud Server database, data directory, and

admin_manual/maintenance/update.rst

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,21 @@ and data, and it automates updating
1515
you have paid support or ask for help in the Nextcloud forums to see if your
1616
issue can be resolved without downgrading.
1717

18-
You should maintain regular backups (see :doc:`backup`), and make a backup
19-
before every update. The built-in updater does not backup your database or data
20-
directory.
18+
.. danger::
19+
You should maintain regular backups (see :doc:`backup`), and make a backup
20+
before every update. The built-in updater does not backup your database or data
21+
directory.
2122

2223
What does the updater do?
2324
-------------------------
2425

2526
.. note::
26-
The updater itself only replaces the existing files with the ones from the
27-
version it updates to. The migration steps needs to be executed afterwards.
28-
The command line mode provides a way to do this right after the code was
29-
successfully replaced.
27+
The built-in updater itself only replaces the existing files with the ones from the
28+
version it updates to. The migration phase, which upgrades your database and apps,
29+
needs to be executed afterwards. In command line mode, the updater offers to trigger this
30+
for you right after the code was successfully replaced by running ``occ upgrade`` for you.
31+
In web mode, the updater finishes and then offers to send you back to your instance's main
32+
URL to trigger the migration phase's web UI.
3033

3134
The built-in updater performs these operations:
3235

@@ -230,3 +233,29 @@ To execute this, run the command with the ``--no-interaction`` option. (i.e.
230233
.. image:: images/updater-cli-8-no-interaction.png
231234
:class: terminal-image
232235

236+
Troubleshooting
237+
---------------
238+
239+
* The built-in updater logs all of its actions to a dedicated log file called
240+
``updater.log`` located in your configured ``datadirectory``
241+
(e.g. ``/var/www/html/data/updater.log``). This file can be helpful in isolating
242+
where things are failing. It will also be needed if you reach out for assistance
243+
on the community help forum (https://help.nextcloud.com).
244+
245+
* If you are having problems using the Updater in web-mode, you should try using
246+
command-line mode (if it's an option in your environment). Command-line avoids
247+
issues with web server timeouts, which can be problematic since sometimes the
248+
Updater can take a long time to complete certain steps.
249+
250+
* If the problem seems to be during the backup step, you can try disabling the
251+
backups the updater automatically creates of the installation files. Keep in
252+
mind these backups do **not** include your data (which you are already hopefully
253+
doing). The backup step can only be disabled while in command-line mode. Append
254+
the option ``--no-backup`` to the ``updater.phar`` command.
255+
256+
* If you accidentally say no when the command-line mode of the updater asks if you'd
257+
like to run ``occ upgrade``, you can safely execute ``occ upgrade`` manually or
258+
simply visit the URL of your instance to complete the database migrations and app
259+
upgrade phase.
260+
261+
* Reach out to the community help forum for assistance (https://help.nextcloud.com)

admin_manual/maintenance/upgrade.rst

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,43 @@
22
How to upgrade
33
==============
44

5-
There are three ways to upgrade your Nextcloud server:
6-
7-
* With the :doc:`Updater <update>`.
8-
* :doc:`Manually upgrading <manual_upgrade>` with the Nextcloud ``.tar`` archive
9-
from our `Download page <https://nextcloud.com/install/>`_.
10-
* :doc:`Upgrading <package_upgrade>` via the snap packages.
11-
* Manually upgrading is also an option for users on shared hosting; download
12-
and unpack the Nextcloud tarball to your PC. Delete your existing Nextcloud
13-
files, except ``data/`` and ``config/`` files, on your hosting account. Then
14-
transfer the new Nextcloud files to your hosting account, again
15-
preserving your existing ``data/`` and ``config/`` files.
16-
17-
When an update is available for your Nextcloud server, you will see a
18-
notification at the top of your Nextcloud Web interface. When you click the
19-
notification it brings you here, to this page.
20-
21-
**It is best to keep your Nextcloud server upgraded regularly**, and to install
22-
all point releases and major releases.
23-
Major releases are 18, 19 or 20. Point releases are intermediate releases for each major release. For example 18.0.4 and 19.0.2 are point releases.
5+
Overview
6+
--------
7+
8+
The approach used to upgrade your Nextcloud Server depends on your installation type. This
9+
manual mainly focuses on the methods that apply to an Archive based installation. If you installed
10+
using Snap, Docker, a pre-built VM, or a package management tool then refer to the installation
11+
and update instructions for that installation method for the most accurate upgrading inststructions
12+
(generally located at the distribution point for the install method you chose).
13+
14+
There are two ways to upgrade an Archive based Nextcloud Server deployment:
15+
16+
* With the :doc:`Built-in Updater <update>` (via the web or command-line interfaces).
17+
* :doc:`Manually upgrading <manual_upgrade>` (using a downloaded Archive file)
18+
19+
The Built-in Updater, in either Web or command-line mode, is the easiest choice for most environments.
20+
However some environments require the manual approach. Both approaches are covered fully here.
21+
22+
.. important::
23+
Before upgrading, especially between major versions (e.g. v27.y.z -> v28.y.z) please review
24+
:ref:`critical changes<critical-changes>` first. These are highlights of changes that may be required
25+
in your environment to accomodate changes in Nextcloud Server. These notes are periodically revised as
26+
needed so it is also a good idea to revisit them periodically, such as when proceeding with maintenance
27+
upgrades.
28+
29+
When an update is available for your Nextcloud server, by default you will receive
30+
a notification. You can also check for available updates by visiting the Update section under
31+
**Administration settings->Overview** in the Web UI.
32+
33+
.. note::
34+
It is best to keep your Nextcloud server upgraded regularly. This means installing all maintenance/point releases
35+
and upgrading to new major releases before your current one reaches :doc:`end-of-life</release_schedule>` status.
36+
Examples of major releases are 27, 28, or 29. Maintenance releases are intermediate releases for each
37+
major release that address critical functionality or security bugs. For example 28.0.4 and 29.0.2 are maintenance
38+
releases.
39+
40+
Approaching Upgrades
41+
--------------------
2442

2543
Nextcloud must be upgraded step by step:
2644
* Before you can upgrade to the next major release, Nextcloud upgrades to the latest point release.
@@ -131,4 +149,4 @@ Those include for example::
131149
$ sudo -u www-data php occ db:add-missing-indices
132150
$ sudo -u www-data php occ db:add-missing-primary-keys
133151

134-
You can use the ``--dry-run`` option to output the SQL queries instead of executing them.
152+
You can use the ``--dry-run`` option to output the SQL queries instead of executing them.

0 commit comments

Comments
 (0)