Hey, Iām coming here cos OC is a mess when it comes to updating.
The Updater only has the files after weeks sometimes and the quality is horrible.
Donāt make the same mistakes ! Create a proper updater which does offer the update when its available from the website.
1 Like
Soko
June 24, 2016, 6:34am
2
4 Likes
John
June 24, 2016, 6:39am
3
Two thumbs up @Soko - Way up! What brilliant news! Highly appreciated!
Soko
June 24, 2016, 11:35am
4
First I perhaps have to clarify that itās not me whoās working on the updaterā¦
ā¦but I think itās coming soon:
opened 12:46PM - 22 Jun 16 UTC
closed 04:13PM - 27 Sep 16 UTC
3. to review
Since I am super annoyed by the fact that the old web updater is broken all the ā¦ time, @MorrisJobke and me sat together and came up with this proposal on what a new updater app should do.
Basically I do believe it's a quick task to get something more reliable than the forked updater and we can easily do that as independent small PHP script. ā I'll see what I can work together, since the updater we ship now is anyways inherently broken we need something fixed anyways. I have lost complete trust in the updater app and want something small that does _LESS_ magic but that _MORE_ reliable.
@schiessle @karlitschek Any more input on below thoughts?
# Update procedure
Use case: Replaces all Nextcloud files with the new ones. It doesn't perform the Nextcloud migration steps or so. The goal is to have a minimal viable product that "just works and doesn't eat data", we can add improvements on top of that later. The steps are divided in different AJAX requests so that we don't run into timeouts. (Don't is such an hard word. I guess there are still possibilities, but less.)
Step 1: Verify that the folder does not contain some custom subfolders or files. If so: Bail out.
Step 1a: Check write permissions on all folders. If not there: Bail out.
Step 2: Set nextcloud into maintenance mode
Step 3: Copy all folders (except data) into "data/updater-$instanceid/backups/nextcloud-X-Y-Z/
Step 4: Download nextcloud folder to $DATADIR/updater-$instanceid/downloads/nextcloud-$versionnumber
Step 5: Extract Nextcloud in the downloads folder and verify integrity of download. If integrity check fails: Bail out.
Step 6: Grep over core/shipped.json and remove all apps that are shipped from the apps folder
Step 7: Overwrite an "index.php", "public.php" and "ocs/v1.php" that just serve a 503 and show an "Update in progress warning"
Step 8: Delete all files except:
- the files of step 7 (to serve 503 on all endpoints - they are overwritten anyways)
- data/
- config/ (except config/config.sample.php)
- non-shipped themes (default & example to be deleted)
- non-shipped apps (see shipped.json for folder to be deleted)
- updater/index.php (and the CSS, JS files that the updater needs ?!?)
Step 9: Move downloaded nextcloud folder into the web root, except updater
Step 10: Replace updater.php PHP file that does the updating steps
Step 11: Disable maintenance mode
Step 12: Goto /.. to trigger web updater
After every step the current step gets written to "data/updater-$instanceid/.update-step" so that if the connection fails by the user the step can be resumed.
# Restore procedure ("Aka undo upgrade")
Use case: If an update fails in one of the 11 steps mentioned before it should be possible to get back to a state before the update. This doesn't catch cases where the Nextcloud migration steps fail. The steps are divided in different AJAX requests so that we don't run into timeouts.
Step 1: Verify that the folder does not contain some custom subfolders or files. If so: Bail out.
Step 1a: Check write permissions on all folders. If not there: Bail out.
Step 2: Set nextcloud into maintenance mode
Step 3: Create an "index.php", "public.php" and "ocs/v1.php" that just serve a 503 and show an "Update in progress warning"
Step 4: Remove all except data and config
Step 5: Copy back $DATADIR/updater-$instanceid/backups/nextcloud-X-Y-Z/ (automatically detect latest) to the web root
Step 6: Replace updater.php PHP file that does the updating steps
Step 7: Disable maintenance mode
# Remarks
- REALLY ESSENTIAL: During testing: kill the connection in every step ...the upgrade then needs to resume fine if the user comes back
- Updater screen is only accessible for properly authenticated admins (see the magic Lukas implemented in oC for that - https://github.com/owncloud/core/pull/22276)
# Future improvements (to be filed as different tickets later)
- manual changes to .htaccess/.user.ini: either show the user the backup and the current new version or try to put as many as possible in the database/config file
1 Like
In fact we already have a branch here: https://github.com/nextcloud/updater/tree/add-simplified-updater
But better donāt take that code yet ā¦ it is rough and weāre working on right now. Weāll share when we have something to test
2 Likes
The team have already stated publicly that making updates via the updater work better is one of their primary priorities, so I think weāre in good hands.
1 Like
Thats good to hear, that the updater gets some love at least.
Everyone will judge you how well you are doing compared to OC, and I believe the updater (and how well updates are running) is the bit where you can easily earn reputation by the crowd ā¦
IMHO
If you want to try the new updater and help with itās improvement (no coding required) take a look at:
1 Like
Will do, thanks for pointing me to it
1 Like