mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
nixos/nextcloud: add some notes for Error: Command "upgrade" is not defined.
This error occurs if `nextcloud-occ maintenance:install` fails and the `upgrade` command is attempted to be executed afterwards. Due to the nature of the installer we can't do much about it, so I guess it makes sense to add some notes about it. The other notes in the `Pitfalls`-section are semantically a list of different topics, so I changed that accordingly now. Closes #111175
This commit is contained in:
parent
40f337454d
commit
561418f996
@ -84,9 +84,13 @@
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
<section xml:id="module-services-nextcloud-pitfalls-during-upgrade">
|
|
||||||
<title>Pitfalls</title>
|
|
||||||
|
|
||||||
|
<section xml:id="module-services-nextcloud-pitfalls-during-upgrade">
|
||||||
|
<title>Common problems</title>
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<formalpara>
|
||||||
|
<title>General notes</title>
|
||||||
<para>
|
<para>
|
||||||
Unfortunately Nextcloud appears to be very stateful when it comes to
|
Unfortunately Nextcloud appears to be very stateful when it comes to
|
||||||
managing its own configuration. The config file lives in the home directory
|
managing its own configuration. The config file lives in the home directory
|
||||||
@ -94,18 +98,17 @@
|
|||||||
<literal>/var/lib/nextcloud/config/config.php</literal>) and is also used to
|
<literal>/var/lib/nextcloud/config/config.php</literal>) and is also used to
|
||||||
track several states of the application (e.g. whether installed or not).
|
track several states of the application (e.g. whether installed or not).
|
||||||
</para>
|
</para>
|
||||||
|
</formalpara>
|
||||||
<para>
|
<para>
|
||||||
All configuration parameters are also stored in
|
All configuration parameters are also stored in
|
||||||
<literal>/var/lib/nextcloud/config/override.config.php</literal> which is generated by
|
<filename>/var/lib/nextcloud/config/override.config.php</filename> which is generated by
|
||||||
the module and linked from the store to ensure that all values from <literal>config.php</literal>
|
the module and linked from the store to ensure that all values from
|
||||||
can be modified by the module.
|
<filename>config.php</filename>can be modified by the module.
|
||||||
However <literal>config.php</literal> manages the application's state and shouldn't be touched
|
However <filename>config.php</filename> manages the application's state and shouldn't be
|
||||||
manually because of that.
|
touched manually because of that.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<warning>
|
<warning>
|
||||||
<para>Don't delete <literal>config.php</literal>! This file
|
<para>Don't delete <filename>config.php</filename>! This file
|
||||||
tracks the application's state and a deletion can cause unwanted
|
tracks the application's state and a deletion can cause unwanted
|
||||||
side-effects!</para>
|
side-effects!</para>
|
||||||
</warning>
|
</warning>
|
||||||
@ -115,7 +118,10 @@
|
|||||||
maintenance:install</literal>! This command tries to install the application
|
maintenance:install</literal>! This command tries to install the application
|
||||||
and can cause unwanted side-effects!</para>
|
and can cause unwanted side-effects!</para>
|
||||||
</warning>
|
</warning>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<formalpara>
|
||||||
|
<title>Multiple version upgrades</title>
|
||||||
<para>
|
<para>
|
||||||
Nextcloud doesn't allow to move more than one major-version forward. If you're e.g. on
|
Nextcloud doesn't allow to move more than one major-version forward. If you're e.g. on
|
||||||
<literal>v16</literal>, you cannot upgrade to <literal>v18</literal>, you need to upgrade to
|
<literal>v16</literal>, you cannot upgrade to <literal>v18</literal>, you need to upgrade to
|
||||||
@ -125,6 +131,46 @@
|
|||||||
release) will be selected by default and the module will generate a warning that reminds
|
release) will be selected by default and the module will generate a warning that reminds
|
||||||
the user to upgrade to latest Nextcloud <emphasis>after</emphasis> that deploy.
|
the user to upgrade to latest Nextcloud <emphasis>after</emphasis> that deploy.
|
||||||
</para>
|
</para>
|
||||||
|
</formalpara>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<formalpara>
|
||||||
|
<title><literal>Error: Command "upgrade" is not defined.</literal></title>
|
||||||
|
<para>
|
||||||
|
This error usually occurs if the initial installation
|
||||||
|
(<command>nextcloud-occ maintenance:install</command>) has failed. After that, the application
|
||||||
|
is not installed, but the upgrade is attempted to be executed. Further context can
|
||||||
|
be found in <link xlink:href="https://github.com/NixOS/nixpkgs/issues/111175">NixOS/nixpkgs#111175</link>.
|
||||||
|
</para>
|
||||||
|
</formalpara>
|
||||||
|
<para>
|
||||||
|
First of all, it makes sense to find out what went wrong by looking at the logs
|
||||||
|
of the installation via <command>journalctl -u nextcloud-setup</command> and try to fix
|
||||||
|
the underlying issue.
|
||||||
|
</para>
|
||||||
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
If this occurs on an <emphasis>existing</emphasis> setup, this is most likely because
|
||||||
|
the maintenance-mode is active. It can be deactivated by running
|
||||||
|
<command>nextcloud-occ maintenance:mode --off</command>. It's advisable though to
|
||||||
|
check the logs first on why the maintenance mode was activated.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<warning><para>Only perform the following measures on
|
||||||
|
<emphasis>freshly installed instances!</emphasis></para></warning>
|
||||||
|
<para>
|
||||||
|
A re-run of the installer can be forced by <emphasis>deleting</emphasis>
|
||||||
|
<filename>/var/lib/nextcloud/config/config.php</filename>. This is the only time
|
||||||
|
where this is advisable because the fresh install doesn't have any state that can be lost.
|
||||||
|
In case that doesn't help, an entire re-creation can be forced via
|
||||||
|
<command>rm -rf ~nextcloud/</command>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section xml:id="module-services-nextcloud-httpd">
|
<section xml:id="module-services-nextcloud-httpd">
|
||||||
|
Loading…
Reference in New Issue
Block a user