Go to file
Josh 60a91df27b
docs(README): Give the project a proper README
* Intro
* Background of the update process of Nextcloud
* Usage: Troubleshooting and tips section
* Development: Making changes, using the Makefile, building properly

Signed-off-by: Josh <josh.t.richards@gmail.com>
2024-02-22 17:58:39 -05:00
.github chore(ci): Fetch all commits for check-same-code-base 2024-01-29 11:06:00 +01:00
lib Revert "Prevent directory modifications when iterating" 2023-11-14 22:59:37 +01:00
tests Bump behat/behat from 3.11.0 to 3.13.0 in /tests 2024-01-29 10:28:40 +01:00
vendor chore: make updater.phar index.php 2024-02-05 17:14:32 +01:00
vendor-bin chore: use Nextcloud coding standards v1.1.1 2023-10-31 17:44:22 +01:00
.gitignore fix: update composer deps and box build workflow 2023-06-08 17:58:35 +02:00
.php-cs-fixer.dist.php chore: use Nextcloud coding standards v1.1.1 2023-10-31 17:44:22 +01:00
Changelog.md Check if update should be run based on updater server response 2016-12-07 13:05:08 +01:00
LICENSE add AGPL license file - fixes #76 2017-01-12 23:37:28 +01:00
Makefile fix: update composer deps and box build workflow 2023-06-08 17:58:35 +02:00
README.md docs(README): Give the project a proper README 2024-02-22 17:58:39 -05:00
box.json Remove unused file version.php 2024-01-29 09:10:28 +01:00
buildVersionFile.php add version number 2016-11-25 16:04:00 +01:00
composer.json Bump symfony/console from 4.4.49 to 5.4.34 2024-01-29 11:06:00 +01:00
composer.lock Bump symfony/console from 5.4.34 to 5.4.35 2024-02-01 02:58:48 +00:00
index.php make index.php updater.phar 2024-01-23 10:50:54 +01:00
index.web.php Fix getUpdateStepFileLocation return type and call 2023-08-03 16:59:44 +02:00
psalm.xml Improve typing and remove PHP 5.4 hacks 2023-08-03 16:55:38 +02:00
updater.phar chore: make updater.phar index.php 2024-02-05 17:14:32 +01:00
updater.php composer run cs:fix 2022-08-01 10:19:58 +02:00

README.md

🤖 Updater ⬆️

This app makes it possible to update an existing Nextcloud Server installation in an automated or semi-automated fashion. When you initiate an update of your Nextcloud Server (either from the command-line via updater.phar or via the Web UI) this is the app that is triggered.

[!TIP] If your installation is broken, your environment does not meet our system requirements, or you are doing something exotic, the automated Updater may not be appropriate. Your use case and circumstances may require you to follow the manual update process described in the Maintenance chapter of the Nextcloud Admin Manual.

Background

Fully updating an existing Nextcloud environment, at a high-level, consists of:

  • Determing which update paths exists for the in-place Nextcloud Server installation then alerting the admin of their availability and explaining their requirements and trade-offs
  • Confirming and preparing the in-use installation (e.g. detecting any currently enabled apps that are incompatible with the target Nextcloud version, triggering some repair and pre-update preparation environment changes)
  • Updating the Nextcloud Server software safely (e.g. handling client connections appropriately during the update, verifying the integrity of the software package, checking the requirements of the runtime environment, handling unexpected problems that arise during any of the update steps, replacing the existing installation files with new ones, utilizing any customizations you made to your config that are meant to influence the update process, and keeping your data protected)
  • Running the database migrations (i.e. adjusting your installation's existing database tables to accomodate changes required by the new version of Nextcloud Server).
  • Updating existing apps

The Updater app focuses on item #1. After the Updater finishes successfully, item #2 is handled either by manually running occ upgrade from the command-line or allowing the Updater app to trigger it for you. Once the database migrations finish, your Nextcloud Server is running the targeted version of the software.

[!IMPORTANT] A complete upgrade of an existing installation also requires running database migrations which this app does handle directly (though it does offer to run occ upgrade on your behalf when the Server application code has been successfully updated.

How it works

The Updater

Useful commands and tips

  • updater.log
  • updater.phar
  • occ repair command that resets step files/folders safely/cleanly

Additional Information

Development History

Design Goals

  • Simple
  • Independent of Server itself
  • Robust enough handle server timeouts and connectivity losses
  • Cleanly handles clients that attempt to connect to Server while an update is in progress
  • Verifies the integrity of installation package before deploying
  • Sanity checks the environment before attempting an update (e.g. permissions, etc.)
  • Usable from both the command-line and the web
  • The web facing piece capable appearing "integrated" into the admin's existing Nextcloud Server Web UI experience
  • Reliable across different different types of filesystems
  • Built-in real-time reporting as well as debug logging to ease different types of troubleshooting scenarios
  • Distributable with the standard Server installation package
  • Optionally capable of rolling back updating the installation if any step fails (note: does not cover database migrations failures)
  • Optionally capable of triggering the database migrations required to finish a full Server upgrade