Open nkakouros opened 4 years ago
There are more issues with the way we currently upgrade:
updater.phar
now asks a question, so we need to pass the --no-interaction
flagconfig.php
?nextcloud_apps
.Is there a reason for not resetting the file permissions, then directly using the upgrader and then setting file permissions properly again?
Extracting the files on top of the old ones is a valid option to upgrade Nextcloud. config.php
and manually installed apps will not be removed as the nextcloud archive will not overwrite those when extracted.
But, if we implement checks so that the maximum major version to be installed is that specified in nextcloud_version
, then I guess there is not much against the automatic update. It does automatic backups and other stuff that are useful.
I'm being very petty here, but the manual says:
Rename your current Nextcloud directory, for example nextcloud-old.
Unpacking the new archive creates a new nextcloud directory populated with your new server files. Move this directory and its contents to the original location of your old server. For example /var/www/, so that once again you have /var/www/nextcloud.
So they don't extract on top but replace the whole folder
You are right, it is cleaner this way. In any case, let's use the occ
utility to upgrade. We should have versions checks though so that the user can "lock" the nextcloud major version.
This is a bit more annoying than I thought:
$ sudo -u www-data php occ upgrade:check
Nextcloud 16.0.6 is available. Get more information /* ... */
Update for files_rightclick to version 0.15.1 is available.
2 updates available
Cool, so we can simply update and end up at the right place (i.e. not jumping versions)? No!
$ sudo -u www-data updater/updater.phar
Nextcloud Updater - version: v16.0.0beta3-4-gc7a4074
Current version is 16.0.0.
Update to Nextcloud 17.0.1 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-17.0.1.zip
I will look into proposing a patch to NC to at least get this fixed for future versions.
nextcloud_version
is used to create the url where Nextcloud will be downloaded from. The role also checks if there is an update available and if there is it re-downloads Nextcloud and re-installs it. The problem is that the url will be for the version defined innextcloud_version
and not the newer version.TODO
updater/updater.phar
to get the update urlnextcloud_update
nextcloud_update: true
variable to toggle the update functionality