Is there a command line to update to specific versions of Nextcloud?

That is correct.

Thanks! I’ll start the Updater in command line mode and let you know how it goes!

1 Like

Does the Web-base Updater update incrementally? So starting with version 25.0.2, I would repeat the Web-base Updater until reaching the the latest version?

Yes. I think so.

@jtr
@devnull

My current version is 25.0.2. The Updater in command line mode or Web based mode is offering version 25.0.13.

I was expecting an incremental version up from 25.0.2.

Is there a flag or option to set which would update incrementally?
Any suggestions?

Thanks!

Update is first to latest release of actual release. For you Nextcloud 25.0.13.

Maintenance and Release Schedule · nextcloud/server Wiki · GitHub

My current version is 25.0.2. The Updater in “command line” mode and “web based” mode is offering version 25.0.13 to update too.

Can I update from my current version of 25.0.2 to version 25.0.13 which is being offered by the updaters?

Yes. And after that you get the update to the latest Nextcloud 26.

1 Like

I got it now. Thanks for your patience! I appreciate you.

I updated from 25.0.3 to 28.0.3

The update went OK until version 28.03. Any advice is welcomed.

I tried running occ db:add-missing-indices which returned: occ not found. I noticed file ownership is root:root.

I also noticed the following files in nextcloud/config …
-rw-r–r-- root root 0 Mar 11 2020 CAN_INSTALL
-rw-r–r-- root root 54131 Mar 11 2020 config.sample.php

… but not config.php.

Well after some time all the files in nextcloud/config have appeared and the file ownership is correct www-data www-data and config.php is there also.

There is the error message:

Security & setup warnings

It’s important for the security and performance of your instance that everything is configured correctly. To help you with that we are doing some automatic checks. Please see the linked documentation for more information.

There are some errors regarding your setup.

  • Some files have not passed the integrity check. List of invalid files… Rescan… For more details see the documentation :arrow_upper_right:.

  • 226 errors in the logs since March 17, 2024

  • Server has no maintenance window start time configured. This means resource intensive daily background jobs will also be executed during your main usage time. We recommend to set it to a time of low usage, so users are less impacted by the load caused from these heavy tasks. For more details see the documentation :arrow_upper_right:.

  • The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running “occ db:add-missing-indices” those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster. Missing optional index “textstep_session” in table “text_steps”. Missing optional index “fs_parent” in table “filecache”. Missing optional index “mounts_user_root_path_index” in table “mounts”. Missing optional index “systag_by_tagid” in table “systemtag_object_mapping”.

  • The PHP OPcache module is not properly configured. The OPcache interned strings buffer is nearly full. To assure that repeating strings can be effectively cached, it is recommended to apply “opcache.interned_strings_buffer” to your PHP configuration with a value higher than “8”… For more details see the documentation :arrow_upper_right:.

  • The database is used for transactional file locking. To enhance performance, please configure memcache, if available. For more details see the documentation :arrow_upper_right:.

Please double check the installation guides :arrow_upper_right:, and check for any errors or warnings in the log.

Check the security of your Nextcloud over our security scan :arrow_upper_right:.

Watch the list. Mostly you must only delete the files.

Not really interesting. Maybe read the errors in the protocol.

documentation

sudo -u www-data php /path/to/nextcloud/occ db:add-missing-indices

Read the linked documentation.

Read the linked documentation.

I ran sudo -u www0data php /path/to/nextcloud/occ db:add-missing-indices. Most of the Security & setup warnings were resolved except for this one:

There are some errors regarding your setup.

Some files have not passed the integrity check. [List of invalid files…] [Rescan…] For more details see the [documentation :arrow_upper_right:].

The List of invalid files is drawio and other problems associated with it. I have an elaborate drawio document I do not want to lose or corrupt. In addition, version 28.0.4 will be available Mar-28-2024 maybe it will address a fix.

However, what can be done to solve the problem with drawio?
Technical information

The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results

  • core
    • INVALID_HASH
      • core/js/mimetypelist.js
    • EXTRA_FILE
      • core/img/filetypes/drawio.svg
      • core/img/filetypes/dwb.svg

Raw output

Array
(
[core] => Array
(
[INVALID_HASH] => Array
(
[core/js/mimetypelist.js] => Array
(
[expected] => 550ab566d30693bfa24ec4b15d9df87731ae8a3be8f79dabf94757e5b8b20eec6e4b678f17af1718297f2872f6b04519eeb024d1dff11947f29da431c7f11201
[current] => 301654cbbe168b8723530db88fd2e40ad688f4e6b0bdaeade5b4fe34bd94d9d3cfe760821e97dc792e585d4b6ccff838597bfd46466bb07d30ff84df4cb79518
)

            )

        [EXTRA_FILE] => Array
            (
                [core/img/filetypes/drawio.svg] => Array
                    (
                        [expected] => 
                        [current] => 92e0974cf869bf8ab969c3442dc2b80d55fde36441d22924db74916a06b407520aa2a9dc39336f9157195ebede697ffac0e639360879255ab91932d406e1897d
                    )

                [core/img/filetypes/dwb.svg] => Array
                    (
                        [expected] => 
                        [current] => 43731dd5f17a048112ea5109b40b02ec019b3ee2324385a0f448e3bd2264cb13dc160ab018d893f92f8e2f168fd09009b51578c8c6b97a02a1617c67ac087701
                    )

            )

    )

)

Thanks!

Delete or move the files

Are these the files to delete or move?

  1. core/js/mimetypelist.js

  2. core/img/filetypes/drawio.svg

  3. core/img/filetypes/dwb.svg

Thanks!

I moved the files:

  1. core/img/filetypes/drawio.svg
  2. core/img/filetypes/dwb.svg

Now, as shown below core/js/mimetypelist.js is INVALID HASH. Is there a replacement hash?

Thanks!

Technical information

The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results

  • core
    • INVALID_HASH
      • core/js/mimetypelist.js

Raw output

Array
(
[core] => Array
(
[INVALID_HASH] => Array
(
[core/js/mimetypelist.js] => Array
(
[expected] => 550ab566d30693bfa24ec4b15d9df87731ae8a3be8f79dabf94757e5b8b20eec6e4b678f17af1718297f2872f6b04519eeb024d1dff11947f29da431c7f11201
[current] => 301654cbbe168b8723530db88fd2e40ad688f4e6b0bdaeade5b4fe34bd94d9d3cfe760821e97dc792e585d4b6ccff838597bfd46466bb07d30ff84df4cb79518
)

            )

    )

)

Which Nextcloud version do you actual use? You can copy it from Github e.g. here. Use here and change on the top left your release. Download raw.

Maybe you can set in config/config.php:
'integrity.check.disabled' => true,

I actually use version 28.0.3.

Can you clarify what you mean by: “… and change on the top left your release.” I don’t see the a button or drop down to change release.

However, I issued this commad:
sudo -u www-data php occ maintenance:mimetype:update-js, which put a copy of the file properly in place. However, Recan produced this error:

Technical information

The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results

  • core
    • INVALID_HASH
      • core/js/mimetypelist.js

Raw output

Array
(
[core] => Array
(
[INVALID_HASH] => Array
(
[core/js/mimetypelist.js] => Array
(
[expected] => 550ab566d30693bfa24ec4b15d9df87731ae8a3be8f79dabf94757e5b8b20eec6e4b678f17af1718297f2872f6b04519eeb024d1dff11947f29da431c7f11201
[current] => 24e6faa4a1361e51ff70027024f41c4b37fdb5f6f347ceb095450ddbde2d0a6b6dd1403be92a912d2889064a9736a9bed89d7dc62470035fc1299d4b977c5f46
)

            )

    )

)

I’ll leave ‘integrity.check.disabled’ => true.

Thanks @devnull. Also thanks to @Alex_Marano for his script.

Here are the steps to the solution:

  1. There is no need to set in config/config.php, ‘integrity.check.disabled’ => true,

  2. Download the correct mimetypelist.js for your specific version as specified by @Alex_Marano in his excellent script shown below:

HT_USER=www-data # change this if your ht user is different
NC_DIR=/var/www/nextcloud
nc_download_default() { local app_id=$1 file=$2 version_tag path=$2
case “$app_id” in
server) version_tag=“v$(awk -F' '/String/{gsub(/ /,”“);$2=tolower($2);print $2}’ “$NC_DIR/version.php”)” ;;
*) xml_f=“$NC_DIR/apps/$app_id/appinfo/info.xml”
version_tag=“v$(xmlstarlet sel -B -t -v “//info/version” “$xml_f”|sed ‘2,$d’)”
path=“apps/$app_id/$file”
esac
sudo -u $HT_USER curl -so $NC_DIR/$path https://raw.githubusercontent.com/nextcloud/$app_id/$version_tag/$file
}

nc_download_default server “core/js/mimetypelist.js”
sudo -u $HT_USER php $NC_DIR/occ integrity:check-core

a) Download the script outside of your nextcloud directory.
b) Adjust HT_USER and NC_DIR for your configuration
c) For example, I pasted the script into a vim file getcorrectMimetypelist.sh
d) saved getcorrectMimetypelist.sh outside my nextcloud directory and chown
    www-data:www-data
e) run the script: sh getcorrectimetypelist.sh
f) from **Security & setup warnings**, Click Recan.
g) Hopefully the problem is solved.

The problem comes from the draw.io app which adds mimetype icons: GitHub - jgraph/drawio-nextcloud: Fork from 2022 nextcloud repo then the integrity check obviously fails, because files were added and changed.

2 Likes

Yes! I appreciate your investigation into the cause. How do I mark this as solved?