Command: ubos-admin update

/docs/gears/developer/understanding/update/

Running

To see the supported options, invoke ubos-admin update --help.

This command must be run as root (sudo ubos-admin update).

Understanding

Invoking this command will:

  1. Suspend all currently deployed Apps and Accessories on them, and replace them with a placeholder “Upgrade in progress” web page.

  2. Create a temporary backup of all data of all currently deployed Apps and Accessories on all Sites on the Device.

  3. Undeploy all Sites, including all the Apps and Accessories on the Device.

  4. If a backup was requested, the backup will be exported and transferred to the specified location.

  5. Upgrade the code on the device. There are two modes:

    • If one or more --pkgfile <pkgfile> arguments were given, only the specified package files will be installed. This internally uses pacman -U <pkgfile>.

    • If no --pkgfile argument was given, UBOS will download and install all available upgraded packages on the the Device. This includes operating-system packages, middleware packages and application packages. This step is equivalent to (and in fact internally uses) pacman -Syu.

  6. Apply a heuristic whether or not the Device should be rebooted. For example, if the Linux kernel has been upgraded, a reboot is typically necessary. This heuristic can be overridden with command-line flags to ubos-admin update. If the Device is to be rebooted, it will be rebooted in this step. The remaining steps will be executed automatically after the reboot. This is performed by writing a file with after-boot commands that will be executed as soon as the rebooting process is complete.

  7. Restore all Sites with all Apps and Accessories from the previously made backup, but with the most recent code version.

  8. Run any necessary data migrations by invoking the various “update” methods in the relevant AppConfigItems. This is described in more detail in Command: ubos-admin restore.

  9. Replaces the placeholder pages with the applications again.

The individual steps are largely the same as documented in Command: ubos-admin backup, Command: ubos-admin undeploy, and Command: ubos-admin restore.

Note that UBOS never upgrades “in-place” but performs a new installation of each App again, with subsequent restore-from-backup. This makes it less likely that “leftover” files get in the way of smooth operation of the new version of the App.

See also: