目录

Nextcloud 升级后添加缺失的索引

升级 Nextcloud

  1. 删除除 /config/data 之外的所有其他文件夹(因为一次不成功的跨大版本升级)。
  2. 逐个升级大版本(不能跨两个大版本升级)。

关于缺失索引的系统警告

kubectl exec -it -n nextcloud nextcloud-6864c47cf4-58vrl -- /bin/sh
# sudo -u www-data php occ db:add-missing-indices
/bin/sh: 1: sudo: not found
# su www-data
This account is currently not available.
# id
uid=0(root) gid=0(root) groups=0(root),33(www-data)

# su www-data -s /bin/sh
$ php occ db:add-missing-indices
Check indices of the share table.
Check indices of the filecache table.
Adding additional size index to the filecache table, this can take some time...
Filecache table updated successfully.
Adding additional size index to the filecache table, this can take some time...
Filecache table updated successfully.
Adding additional path index to the filecache table, this can take some time...
Filecache table updated successfully.
Check indices of the twofactor_providers table.
Check indices of the login_flow_v2 table.
Check indices of the whats_new table.
Check indices of the cards table.
Adding cards_abiduri index to the cards table, this can take some time...
cards table updated successfully.
Check indices of the cards_properties table.
Check indices of the calendarobjects_props table.
Check indices of the schedulingobjects table.
Check indices of the oc_properties table.
Adding properties_pathonly_index index to the oc_properties table, this can take some time...
oc_properties table updated successfully.
Check indices of the oc_jobs table.
Adding job_lastcheck_reserved index to the oc_jobs table, this can take some time...
oc_properties table updated successfully.
$ exit
# exit