KUSONEKOの見る世界

Nextcloud 24 にアップデート

Nextcloud 23.0.5にアップデートしてみたら、24.0.1が出てきたので、アップデートしてみました。

Nextcloud 24 のアップデート内容

自分のような個人利用に関係ありそうなアップデート内容は以下です。

  • データベースの負荷が1/4
  • Talkのパフォーマンス向上、リアクションにどんな絵文字でも使える、デスクトップに通知される?
  • Text(拡張子.mdのやつ)でテーブルなど使える機能が増えた

パフォーマンスが上がるなら、アップデートする価値があると思います。

企業ユーザーなら、グループウェアやファイルロック周りが良くなっているようなので、更に価値があるでしょう。

いつも通りにアップデート

Webでバージョンアップするとタイムアウトで失敗するため、いつも通りCLIで実行しました。

# cd /var/www/html/nextcloud/updater/
# sudo -u nginx php updater.phar

Nextcloud Updater - version: v20.0.0beta4-11-g68fa0d4

Current version is 23.0.5. 

Update to Nextcloud 24.0.1 available. (channel: "stable")                                                               
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-24.0.1.zip
Open changelog ?                                    

Steps that will be executed:
[ ] Check for expected files
[ ] Check for write permissions
[ ] Create backup
[ ] Downloading
[ ] Verify integrity
[ ] Extracting
[ ] Enable maintenance mode
[ ] Replace entry points
[ ] Delete old files
[ ] Move new files in place
[ ] Done

Start update? [y/N] y
Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.

[?] Check for expected files
[?] Check for write permissions
[?] Create backup
[?] Downloading
[?] Verify integrity
[?] Extracting
[?] Enable maintenance mode
[?] Replace entry points
[?] Delete old files
[?] Move new files in place
[?] Done

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] Y
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade

(snip)

Keep maintenance mode active? [y/N] n

Maintenance mode is disabled

セキュリティ&セットアップ警告の消し込み

Nextcloud 24.0.1 にアップデートした時に出たものです。

  • データベースにいくつかのインデックスがありません。 大きなテーブルにインデックスを追加すると、自動的に追加されないまでに時間がかかる可能性があるためです。 "occ db:add-missing-indices"を実行することによって、インスタンスが実行し続けている間にそれらの欠けているインデックスを手動で追加することができます。 インデックスが追加されると、それらのテーブルへのクエリは通常はるかに速くなります。
    • テーブル "oc_direct_edit"のインデックス "direct_edit_timestamp"が見つかりません。

    →以下の通り実施

    # cd /var/www/html/nextcloud/
    # sudo -u nginx 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.
    Check indices of the share table.
    Check indices of the filecache table.
    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.
    Adding direct_edit_timestamp index to the oc_direct_edit table, this can take some time...
    oc_direct_edit table updated successfully.

以下は、Nextcloud 24.0.6 付近にアップデートした時に出たものです。

  • データベース内の一部のカラムで、大きなint型への変換が欠落しています。大きなテーブルのカラムタイプの変更には時間がかかるため、それらは自動的に変更されませんでした。occ db:convert-filecache-bigint" を実行することで、それらの保留中の変更を手動で適用することができます。この操作は、インスタンスがオフラインの時に行う必要があります。詳しくはこのドキュメントページを読んでください。
    • file_metadata.id

    →以下の通り実施

    # cd /var/www/html/nextcloud/
    # sudo -u nginx php occ db:convert-filecache-bigint
    Following columns will be updated:
    
    * files_trash.auto_id
    * file_metadata.id
    
    This can take up to hours, depending on the number of files in your instance!
    Continue with the conversion (y/n)? [n] y

以下は、Nextcloud 24.0.7 にアップデートした時に出たものです。

  • データベースにいくつかのインデックスがありません。 大きなテーブルにインデックスを追加すると、自動的に追加されないまでに時間がかかる可能性があるためです。 "occ db:add-missing-indices"を実行することによって、インスタンスが実行し続けている間にそれらの欠けているインデックスを手動で追加することができます。 インデックスが追加されると、それらのテーブルへのクエリは通常はるかに速くなります。
    • テーブル "oc_mounts"のインデックス "mounts_class_index"が見つかりません。

    →以下の通り実施

    # cd /var/www/html/nextcloud/
    # sudo -u nginx php occ db:add-missing-indices
    Check indices of the share table.
    Check indices of the filecache table.
    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_mounts table.
    Adding mounts_class_index index to the oc_mounts table, this can take some time...
    oc_mounts table updated successfully.