I am on nextcloud 9.0.54 at the moment.
Last update was made Dec 2016 I Think.
Now I want to update to the new version.
Webupdater startet the update, but gave me an error, I shout use the oc-command tu update.
In this Documentation I found the hint, that any little update shoud be done one after one manualy: How to Upgrade
“…It is best to keep your Nextcloud server upgraded regularly, and to install all point releases and major releases without skipping any of them, as skipping releases increases the risk of errors… Skipping major releases is not supported”
So i downloaded 19 Updates from nextcloud.
Than I tried to follow this howto: Upgrade Manually
There in find: “Download and unpack the latest Nextcloud Server release (Archive file) from nextcloud.com/install/…”
But before they told to make any point-update step by step.
So, what ist true here??
The manual update process has 11 steps.
From stopping the websever, rename current Nextcloud folder, disabeling apps, copyig data and config, restart websever and make the occ upgrade etc.
Big question:
Do I need to do all 11 steps 19 times (=209 steps)?
Including stop and start the webserver, copy files etc.?
I made a copy of the productive-VM so I have the chance to try a few things and get back to a snapshot for testing.
What is best practice for updating in my situation?
I tink in the future it would be best to login once a week and start the web-updater if any new version is there.
The Links You gave me end “…#latest”.
So I go directly from 9.0.54 to the latest 10 (10.0.0.6)
Next step: 10.0.0.6 to 11.0.4
Last step: 11.0.4 to 12.0.2
I tried to do the updates last weekend.
The procedure was a desaster, because copy back the data into the new nexcloud folder made the VM very big and the host turned off the VM because of to much space.
As a VMWare user, I now had to struggle with Microsofts Virtualisation. The next hours I had to switch focus to Hyper-V.
Shrinking the VM (compact) did not work. I made snapshots to be able to go back to an older state. With snapshots compact does not work. Linux Mint in guest made the next problems compacting.
At the end, I deleted the whole VM an started again with a fresh copy.
Step 7:
copy back data killed me last time, because it doubled the needed space. Now i used mv instead.
QUESTION:
What about the owner, rights ad timestamps? I am not sure when I have to use -p switch to preserve the original values when I put the data back into the new nextcloud version.
Or is ist enough to to a chown www-data:www-data /nextcloud after everything is o.k.?
i made the upgrades to 12.02
Web GUI showed problems
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.
So I tried to repair: sudo -u www-data php occ maintenance:repair
Output after repair:
Failed to load repair step for dav: Repair step ‘OCA\DAV\Migration\FixBirthdayCalendarComponent’ is unknown
Failed to load repair step for dav: Repair step ‘OCA\DAV\Migration\CalDAVRemoveEmptyValue’ is unknown
Failed to load repair step for dav: Repair step ‘OCA\DAV\Migration\BuildCalendarSearchIndex’ is unknown
Failed to load repair step for files_sharing: Repair step ‘OCA\Files_Sharing\Migration\OwncloudGuestShareType’ is unknown
Failed to load repair step for files_sharing: Repair step ‘OCA\Files_Sharing\Migration\SetPasswordColumn’ is unknown
Failed to load repair step for theming: Repair step ‘OCA\Theming\Migration\ThemingImages’ is unknown
Failed to load repair step for twofactor_backupcodes: Repair step ‘OCA\TwoFactorBackupCodes\Migration\CopyEntriesFromOldTable’ is unknown
Repair MySQL collation
All tables already have the correct collation -> nothing to do
Unfortunately, I cannot assist you on your specific issue. However, from my experience with several manual updates I would like to suggest to store your Nextcloud data in a different location by default. To my knowledge this avoids hassle with copying all data at each update.
You should locate your Nextcloud data directory outside of your Web root if you are using an HTTP server other than Apache, or you may wish to store your Nextcloud data in a different location for other reasons (e.g. on a storage server). It is best to configure your data directory location at installation, as it is difficult to move after installation. You may put it anywhere; in this example is it located in /var/oc_data. This directory must already exist, and must be owned by your HTTP user.
I can appreciate this has caused you problems, but those steps are there for your protection, should the copy fail you don’t lose data. No one but you can look after your own system, including ensuring you have enough disk space to upgrade.
Which is fine I guess, but if it failed I’m sure there’d be an even bigger problem
On permissions, I’m a fan of rsync as with the -a switch it’ll preserve all permissions and you don’t need to worry.
On the missing files/invalid hash, you haven’t copied them back in from the backup you made. As they’re hidden you need to reference them explicitly - sudo cp /path/to/backup/.user.ini /path/to/install/