NextCloud Update: Difference between revisions

From WikiMLT
Line 2: Line 2:


== Using the command line based updater ==
== Using the command line based updater ==
Update the NextCloud app itself - the command can also be used to complete a stuck web update.<syntaxhighlight lang="shell" line="1">
Update the NextCloud app itself - the command can also be used to complete a stuck web update.
<syntaxhighlight lang="shell" line="1" class="code-continue mlw-shell-gray">
NC_ROOT="/var/www/cloud.metalevel.tech"
NC_ROOT="/var/www/cloud.metalevel.tech"
NC_OWNER="www-data"
NC_OWNER="www-data"
</syntaxhighlight><syntaxhighlight lang="shell" line="1">
</syntaxhighlight>
<syntaxhighlight lang="shell" line="1">
sudo -u "${NC_OWNER}" \
sudo -u "${NC_OWNER}" \
php --define apc.enable_cli=1 "${NC_ROOT}/updater/updater.phar"
php --define apc.enable_cli=1 "${NC_ROOT}/updater/updater.phar"
</syntaxhighlight>In order to update all apps from CLI use:<syntaxhighlight lang="shell" line="1">
</syntaxhighlight>
In order to update all apps from CLI use:
<syntaxhighlight lang="shell" line="1">
sudo -u "${NC_OWNER}" \
sudo -u "${NC_OWNER}" \
php --define apc.enable_cli=1 "${NC_ROOT}/occ" app:update --all
php --define apc.enable_cli=1 "${NC_ROOT}/occ" app:update --all
</syntaxhighlight>Further you may need to add the missing database indexes:<syntaxhighlight lang="shell" line="1">
</syntaxhighlight>
Further you may need to add the missing database indexes:
<syntaxhighlight lang="shell" line="1">
sudo -u "${NC_OWNER}" \
sudo -u "${NC_OWNER}" \
php --define apc.enable_cli=1 "${NC_ROOT}/occ" db:add-missing-indices
php --define apc.enable_cli=1 "${NC_ROOT}/occ" db:add-missing-indices

Revision as of 11:28, 25 February 2023

Us­ing the com­mand line based up­dater

Up­date the NextCloud app it­self – the com­mand can al­so be used to com­plete a stuck web up­date.

NC_ROOT="/var/www/cloud.metalevel.tech"
NC_OWNER="www-data"
sudo -u "${NC_OWNER}" \
php --define apc.enable_cli=1 "${NC_ROOT}/updater/updater.phar"

In or­der to up­date all apps from CLI use:

sudo -u "${NC_OWNER}" \
php --define apc.enable_cli=1 "${NC_ROOT}/occ" app:update --all

Fur­ther you may need to add the miss­ing data­base in­dex­es:

sudo -u "${NC_OWNER}" \
php --define apc.enable_cli=1 "${NC_ROOT}/occ" db:add-missing-indices

Ref­er­ences