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 == | ||
Update the NextCloud app itself - the command can also be used to complete a stuck web update.<syntaxhighlight lang="shell" line="1"> | |||
sudo -u | NC_ROOT="/var/www/cloud.metalevel.tech" | ||
php --define apc.enable_cli=1 | 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 | sudo -u "${NC_OWNER}" \ | ||
php --define apc.enable_cli=1 | 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 | sudo -u "${NC_OWNER}" \ | ||
php --define apc.enable_cli=1 | php --define apc.enable_cli=1 "${NC_ROOT}/occ" db:add-missing-indices | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 10:26, 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