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 10:28, 25 February 2023
Using the command line based updater
Update the NextCloud app itself – the command can also be used to complete a stuck web update.
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 order to update all apps from CLI use:
sudo -u "${NC_OWNER}" \
php --define apc.enable_cli=1 "${NC_ROOT}/occ" app:update --all
Further you may need to add the missing database indexes:
sudo -u "${NC_OWNER}" \
php --define apc.enable_cli=1 "${NC_ROOT}/occ" db:add-missing-indices
References
- NextCloud Docs: Using the web based updater | Finish via command line based upgrade
- NextCloud Docs: Using the command line based updater
- NextCloud Docs: Using the
occ
command