table of contents
SYSTEMD-SYSUPDATE(8) | systemd-sysupdate | SYSTEMD-SYSUPDATE(8) |
NAME¶
systemd-sysupdate, systemd-sysupdate.service, systemd-sysupdate.timer, systemd-sysupdate-reboot.service, systemd-sysupdate-reboot.timer - Automatically Update OS or Other Resources
SYNOPSIS¶
systemd-sysupdate [OPTIONS...]
systemd-sysupdate.service
DESCRIPTION¶
systemd-sysupdate atomically updates the host OS, container images, portable service images or other sources, based on the transfer configuration files described in sysupdate.d(5).
This tool implements file, directory, or partition based update schemes, supporting multiple parallel installed versions of specific resources in an A/B (or even: A/B/C, A/B/C/D/, ...) style. A/B updating means that when one version of a resource is currently being used, the next version can be downloaded, unpacked, and prepared in an entirely separate location, independently of the first, and — once complete — be activated, swapping the roles so that it becomes the used one and the previously used one becomes the one that is replaced by the next update, and so on. The resources to update are defined in transfer files, one for each resource to be updated. For example, resources that may be updated with this tool could be: a root file system partition, a matching Verity partition plus one kernel image. The combination of the three would be considered a complete OS update.
The tool updates partitions, files or directory trees always in whole, and operates with at least two versions of each of these resources: the current version, plus the next version: the one that is being updated to, and which is initially incomplete as the downloaded data is written to it; plus optionally more versions. Once the download of a newer version is complete it becomes the current version, releasing the version previously considered current for deletion/replacement/updating.
When installing new versions the tool will directly download, decompress, unpack and write the new version into the destination. This is done in a robust fashion so that an incomplete download can be recognized on next invocation, and flushed out before a new attempt is initiated.
Note that when writing updates to a partition, the partition has to exist already, as systemd-sysupdate will not automatically create new partitions. Use a tool such as systemd-repart(8) to automatically create additional partitions to be used with systemd-sysupdate on boot.
The tool can both be used on the running OS, to update the OS in "online" state from within itself, and on "offline" disk images, to update them from the outside based on transfer files embedded in the disk images. For the latter, see --image= below. The latter is particularly interesting to update container images or portable service images.
The systemd-sysupdate.service system service will automatically update the host OS based on the installed transfer files. It is triggered in regular intervals via systemd-sysupdate.timer. The systemd-sysupdate-reboot.service will automatically reboot the system after a new version is installed. It is triggered via systemd-sysupdate-reboot.timer. The two services are separate from each other as it is typically advisable to download updates regularly while the system is up, but delay reboots until the appropriate time (i.e. typically at night). The two sets of service/timer units may be enabled separately.
For details about transfer files and examples see sysupdate.d(5).
COMMAND¶
The following commands are understood:
list [VERSION]
If no command is explicitly specified this command is implied.
Added in version 251.
check-new
Added in version 251.
update [VERSION]
If a new version to install/update to is found, old installed versions are deleted until at least one new version can be installed, as configured via InstanceMax= in sysupdate.d(5), or via the available partition slots of the right type. This implicit operation can also be invoked explicitly via the vacuum command described below.
Added in version 251.
vacuum
Added in version 251.
pending
Added in version 251.
reboot
Added in version 251.
components
Added in version 251.
-h, --help
--version
OPTIONS¶
The following options are understood:
--component=, -C
Use the components command to list available components to update. This enumerates the directories matching this naming rule.
Components may be used to define a separate set of transfer files for different components of the OS that shall be updated separately. Do not use this concept for resources that shall always be updated together in a synchronous fashion. Simply define multiple transfer files within the same sysupdate.d/ directory for these cases.
This option may not be combined with --definitions=.
Added in version 251.
--definitions=
This option may not be combined with --component=.
Added in version 251.
--root=
Added in version 251.
--image=
Added in version 251.
--image-policy=policy
--instances-max=, -m
Added in version 251.
--sync=
Added in version 251.
--verify=
Added in version 251.
--reboot
Added in version 251.
--no-pager
--no-legend
--json=MODE
EXIT STATUS¶
On success, 0 is returned, a non-zero failure code otherwise.
SEE ALSO¶
systemd 256.8 |