NextCloud Update: Difference between revisions

From WikiMLT
m (Стадий: 3 [Фаза:Разработване, Статус:Разутвърден]; Категория:Linux Server)
Line 2: Line 2:


== Using the command line based updater ==
== Using the command line based updater ==
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">
sudo -u www-data \
NC_ROOT="/var/www/cloud.metalevel.tech"
php --define apc.enable_cli=1 /var/www/cloud.metalevel.tech/updater/updater.phar
NC_OWNER="www-data"
</syntaxhighlight><syntaxhighlight lang="shell" line="1">
sudo -u "${NC_OWNER}" \
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 www-data \
sudo -u "${NC_OWNER}" \
php --define apc.enable_cli=1 /var/www/cloud.metalevel.tech/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 www-data \
sudo -u "${NC_OWNER}" \
php --define apc.enable_cli=1 /var/www/cloud.metalevel.tech/occ db:add-missing-indices
php --define apc.enable_cli=1 "${NC_ROOT}/occ" db:add-missing-indices
</syntaxhighlight>
</syntaxhighlight>



Revision as of 11:26, 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