解决nextcloud报:数据库丢失了一些索引错误

• 数据库丢失了一些索引。由于给大的数据表添加索引会耗费一些时间,因此程序没有自动对其进行修复。您可以在 Nextcloud 运行时通过命令行手动执行 "occ db:add-missing-indices" 命令修复丢失的索引。索引修复后会大大提高相应表的查询速度。

报错内容

安全与设置警告

您的每项配置对于实例的安全性和性能都至关重要。 为了帮助您,我们正在做一些自动检查。 有关详细信息,请参阅文档链接。

关于您的设置有一些警告。

  • 通过 HTTP 不安全访问站点。强烈建议你将服务器设置为要求 HTTPS,参考步骤见 安全小贴士 ↗
  • 你还没有设置或验证你的电子邮件服务器配置。请前往基本设置,以便进行设置。之后,使用表单下方的 "发送电子邮件 "按钮来验证您的设置。
  • 数据库丢失了一些索引。由于给大的数据表添加索引会耗费一些时间,因此程序没有自动对其进行修复。您可以在 Nextcloud 运行时通过命令行手动执行 "occ db:add-missing-indices" 命令修复丢失的索引。索引修复后会大大提高相应表的查询速度。
  • 在数据表 "oc_filecache" 中无法找到索引 "fs_parent"。

请仔细检查安装指南↗,并检查日志中是否有错误或警告。

通过我们的安全检查 ↗检查您 Nextcloud 的安全

解决方法

输入命令行:docker exec --user www-data -it nextcloud php occ db:add-missing-indices

root@ITX:/nextcloud# docker exec --user www-data -it nextcloud  php occ db:add-missing-indices
Check indices of the share table.
Check indices of the filecache table.
Adding additional parent 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.
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.
Check indices of the oc_jobs table.
Check indices of the oc_direct_edit table.
Check indices of the oc_preferences table.
Check indices of the oc_mounts table.

问题解决

数据库丢失了一些索引。由于给大的数据表添加索引会耗费一些时间,因此程序没有自动对其进行修复。您可以在 Nextcloud 运行时通过命令行手动执行 "occ db:add-missing-indices" 命令修复丢失的索引。索引修复后会大大提高相应表的查询速度。



知识共享许可协议本作品采用知识共享署名-相同方式共享 4.0 国际许可协议进行许可。

相关推荐

Docker + OnlyOffice + Nextcloud 部署和配置

之前用的是Docker + Collabora Office + Nextcloud。
因为Collabora Office 编辑大数据文档的时候,编辑很慢,经常输入一段话,要很长时间才打印出来。、所以用了OnlyOffice,这个就不会出现上面的问题。
当时打开文档的时候会很慢,要加载,不知道是不是因为frp到公网的问题。

群晖docker部署owncloud

1)安装MySQL 2)安装owncloud 3)docker部署MySQL和owncloud 详细步骤见:https://www.saiita.com.cn/838.html 4)设 ...

1 条评论

  1. 👍

目录展开