报错内容
One or more mimetype migrations are available. Occasionally new mimetypes are added to better handle certain file types. Migrating the mimetypes take a long time on larger instances so this is not done automatically during upgrades. Use the command occ maintenance:repair –include-expensive to perform the migrations.
解决它
这是因为使用了nginx看到的错误提示,Nextcloud 提示有可用的 MIME 类型迁移,这是正常的升级过程。可以手动运行以下命令来执行迁移:
sudo -u www-data php /home/wwwroot/nextcloud/occ maintenance:repair --include-expensive
sudo -u www-data 以 Nextcloud 运行的用户(通常是 www-data)执行命令。
php /home/wwwroot/nextcloud/occ maintenance:repair –include-expensive 运行 Nextcloud 维护命令,如 MIME 类型迁移。
如果你的 Nextcloud 运行在不同用户(如 nginx),请修改 www-data 为相应用户。
如果你安装的nextcloud目录和我不同,请修改为自己对应的目录。例如官方指引是/var/www