Debian Codegraph @

upstream/debian-trixie/man8/systemd-sysupdate.8

raw
1 '\" t
2 .TH "SYSTEMD\-SYSUPDATE" "8" "" "systemd 257.13" "systemd-sysupdate"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 systemd-sysupdate, systemd-sysupdate.service, systemd-sysupdate.timer, systemd-sysupdate-reboot.service, systemd-sysupdate-reboot.timer \- Automatically Update OS or Other Resources
24 .SH "SYNOPSIS"
25 .HP \w'\fBsystemd\-sysupdate\fR\ 'u
26 \fBsystemd\-sysupdate\fR [OPTIONS...]
27 .PP
28 systemd\-sysupdate\&.service
29 .SH "DESCRIPTION"
30 .PP
31 \fBsystemd\-sysupdate\fR
32 atomically updates the host OS, container images, portable service images or other sources, based on the transfer configuration files described in
33 \fBsysupdate.d\fR(5)\&.
34 .PP
35 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 \(em once complete \(em 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\&.
36 .PP
37 The tool updates partitions, files or directory trees always in whole, and operates with at least two versions of each of these resources: the
38 \fIcurrent\fR
39 version, plus the
40 \fInext\fR
41 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\&.
42 .PP
43 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\&.
44 .PP
45 Note that when writing updates to a partition, the partition has to exist already, as
46 \fBsystemd\-sysupdate\fR
47 will not automatically create new partitions\&. Use a tool such as
48 \fBsystemd-repart\fR(8)
49 to automatically create additional partitions to be used with
50 \fBsystemd\-sysupdate\fR
51 on boot\&.
52 .PP
53 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
54 \fB\-\-image=\fR
55 below\&. The latter is particularly interesting to update container images or portable service images\&.
56 .PP
57 The
58 systemd\-sysupdate\&.service
59 system service will automatically update the host OS based on the installed transfer files\&. It is triggered in regular intervals via
60 systemd\-sysupdate\&.timer\&. The
61 systemd\-sysupdate\-reboot\&.service
62 will automatically reboot the system after a new version is installed\&. It is triggered via
63 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\&.
64 .PP
65 For details about transfer files and examples see
66 \fBsysupdate.d\fR(5)\&.
67 .SH "COMMAND"
68 .PP
69 The following commands are understood:
70 .PP
71 \fBlist\fR [\fIVERSION\fR]
72 .RS 4
73 If invoked without an argument, enumerates downloadable and installed versions, and shows a summarizing table with the discovered versions and their properties, including whether there\*(Aqs a newer candidate version to update to\&. If a version argument is specified, shows details about the specific version, including the individual files that need to be transferred to acquire the version\&.
74 .sp
75 If no command is explicitly specified this command is implied\&.
76 .sp
77 Added in version 251\&.
78 .RE
79 .PP
80 \fBfeatures\fR [\fIFEATURE\fR]
81 .RS 4
82 If invoked without an argument, enumerates optional features and shows a summarizing table, including which features are enabled or disabled\&. If a feature argument is specified, shows details about the specific feature, including the transfers that are controlled by the feature\&.
83 .sp
84 Added in version 257\&.
85 .RE
86 .PP
87 \fBcheck\-new\fR
88 .RS 4
89 Checks if there\*(Aqs a new version available\&. This internally enumerates downloadable and installed versions and returns exit status 0 if there\*(Aqs a new version to update to, non\-zero otherwise\&. If there is a new version to update to, its version identifier is written to standard output\&.
90 .sp
91 Added in version 251\&.
92 .RE
93 .PP
94 \fBupdate\fR [\fIVERSION\fR]
95 .RS 4
96 Installs (updates to) the specified version, or if none is specified to the newest version available\&. If the version is already installed or no newer version available, no operation is executed\&.
97 .sp
98 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
99 \fIInstanceMax=\fR
100 in
101 \fBsysupdate.d\fR(5), or via the available partition slots of the right type\&. This implicit operation can also be invoked explicitly via the
102 \fBvacuum\fR
103 command described below\&.
104 .sp
105 Added in version 251\&.
106 .RE
107 .PP
108 \fBvacuum\fR
109 .RS 4
110 Deletes old installed versions until the limits configured via
111 \fIInstanceMax=\fR
112 in
113 \fBsysupdate.d\fR(5)
114 are met again\&. Normally, it should not be necessary to invoke this command explicitly, since it is implicitly invoked whenever a new update is initiated\&.
115 .sp
116 Added in version 251\&.
117 .RE
118 .PP
119 \fBpending\fR
120 .RS 4
121 Checks whether a newer version of the OS is installed than the one currently running\&. Returns zero if so, non\-zero otherwise\&. This compares the newest installed version\*(Aqs identifier with the OS image version as reported by the
122 \fIIMAGE_VERSION=\fR
123 field in
124 /etc/os\-release\&. If the former is newer than the latter, an update was apparently completed but not activated (i\&.e\&. rebooted into) yet\&.
125 .sp
126 Added in version 251\&.
127 .RE
128 .PP
129 \fBreboot\fR
130 .RS 4
131 Similar to the
132 \fBpending\fR
133 command but immediately reboots in case a newer version of the OS has been installed than the one currently running\&. This operation can be done implicitly together with the
134 \fBupdate\fR
135 command, after a completed update via the
136 \fB\-\-reboot\fR
137 switch, see below\&. This command will execute no operation (and return success) if no update has been installed, and thus the system was not rebooted\&.
138 .sp
139 Added in version 251\&.
140 .RE
141 .PP
142 \fBcomponents\fR
143 .RS 4
144 Lists components that can be updated\&. This enumerates the
145 /etc/sysupdate\&.*\&.d/,
146 /run/sysupdate\&.*\&.d/
147 and
148 /usr/lib/sysupdate\&.*\&.d/
149 directories that contain transfer files\&. This command is useful to list possible parameters for
150 \fB\-\-component=\fR
151 (see below)\&.
152 .sp
153 Added in version 251\&.
154 .RE
155 .PP
156 \fB\-h\fR, \fB\-\-help\fR
157 .RS 4
158 Print a short help text and exit\&.
159 .RE
160 .PP
161 \fB\-\-version\fR
162 .RS 4
163 Print a short version string and exit\&.
164 .RE
165 .SH "OPTIONS"
166 .PP
167 The following options are understood:
168 .PP
169 \fB\-\-component=\fR, \fB\-C\fR
170 .RS 4
171 Selects the component to update\&. Takes a component name as argument\&. This has the effect of slightly altering the search logic for transfer files\&. If this switch is not used, the transfer files are loaded from
172 /etc/sysupdate\&.d/*\&.conf,
173 /run/sysupdate\&.d/*\&.conf
174 and
175 /usr/lib/sysupdate\&.d/*\&.conf\&. If this switch is used, the specified component name is used to alter the directories to look in to be
176 /etc/sysupdate\&.\fIcomponent\fR\&.d/*\&.conf,
177 /run/sysupdate\&.\fIcomponent\fR\&.d/*\&.conf
178 and
179 /usr/lib/sysupdate\&.\fIcomponent\fR\&.d/*\&.conf, each time with the
180 \fIcomponent\fR
181 string replaced with the specified component name\&.
182 .sp
183 Use the
184 \fBcomponents\fR
185 command to list available components to update\&. This enumerates the directories matching this naming rule\&.
186 .sp
187 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
188 sysupdate\&.d/
189 directory for these cases\&.
190 .sp
191 This option may not be combined with
192 \fB\-\-definitions=\fR\&.
193 .sp
194 Added in version 251\&.
195 .RE
196 .PP
197 \fB\-\-definitions=\fR
198 .RS 4
199 A path to a directory\&. If specified, the transfer
200 *\&.conf
201 files are read from this directory instead of
202 /usr/lib/sysupdate\&.d/*\&.conf,
203 /etc/sysupdate\&.d/*\&.conf, and
204 /run/sysupdate\&.d/*\&.conf\&.
205 .sp
206 This option may not be combined with
207 \fB\-\-component=\fR\&.
208 .sp
209 Added in version 251\&.
210 .RE
211 .PP
212 \fB\-\-root=\fR
213 .RS 4
214 Takes a path to a directory to use as root file system when searching for
215 sysupdate\&.d/*\&.conf
216 files\&.
217 .sp
218 Added in version 251\&.
219 .RE
220 .PP
221 \fB\-\-image=\fR
222 .RS 4
223 Takes a path to a disk image file or device to mount and use in a similar fashion to
224 \fB\-\-root=\fR, see above\&. If this is used and partition resources are updated this is done inside the specified disk image\&.
225 .sp
226 Added in version 251\&.
227 .RE
228 .PP
229 \fB\-\-image\-policy=\fR\fB\fIpolicy\fR\fR
230 .RS 4
231 Takes an image policy string as argument, as per
232 \fBsystemd.image-policy\fR(7)\&. The policy is enforced when operating on the disk image specified via
233 \fB\-\-image=\fR, see above\&. If not specified, defaults to the
234 "*"
235 policy, i\&.e\&. all recognized file systems in the image are used\&.
236 .RE
237 .PP
238 \fB\-\-instances\-max=\fR, \fB\-m\fR
239 .RS 4
240 Takes a decimal integer greater than or equal to 2 while updating or 1 while vacuuming\&. Controls how many versions to keep at any time\&. This option may also be configured inside the transfer files, via the
241 \fIInstancesMax=\fR
242 setting, see
243 \fBsysupdate.d\fR(5)
244 for details\&.
245 .sp
246 Added in version 251\&.
247 .RE
248 .PP
249 \fB\-\-sync=\fR
250 .RS 4
251 Takes a boolean argument, defaults to yes\&. This may be used to specify whether the newly updated resource versions shall be synchronized to disk when appropriate (i\&.e\&. after the download is complete, before it is finalized, and again after finalization)\&. This should not be turned off, except to improve runtime performance in testing environments\&.
252 .sp
253 Added in version 251\&.
254 .RE
255 .PP
256 \fB\-\-verify=\fR
257 .RS 4
258 Takes a boolean argument, defaults to yes\&. Controls whether to cryptographically verify downloads\&. Do not turn this off, except in testing environments\&.
259 .sp
260 Added in version 251\&.
261 .RE
262 .PP
263 \fB\-\-reboot\fR
264 .RS 4
265 When used in combination with the
266 \fBupdate\fR
267 command and a new version is installed, automatically reboots the system immediately afterwards\&.
268 .sp
269 Added in version 251\&.
270 .RE
271 .PP
272 \fB\-\-offline\fR
273 .RS 4
274 Prevents fetching metadata from the network (i\&.e\&.
275 SHA256SUMS)\&. This is most useful when used in combination with the
276 \fBlist\fR
277 command, to query locally installed versions\&.
278 .sp
279 Added in version 257\&.
280 .RE
281 .PP
282 \fB\-\-transfer\-source=\fR
283 .RS 4
284 Takes a path as its argument\&. When specified, all transfer sources configured with
285 \fIPathRelativeTo=explicit\fR
286 will be interpreted relative to the specified path\&.
287 .sp
288 Added in version 257\&.
289 .RE
290 .PP
291 \fB\-\-no\-pager\fR
292 .RS 4
293 Do not pipe output into a pager\&.
294 .RE
295 .PP
296 \fB\-\-no\-legend\fR
297 .RS 4
298 Do not print the legend, i\&.e\&. column headers and the footer with hints\&.
299 .RE
300 .PP
301 \fB\-\-json=\fR\fB\fIMODE\fR\fR
302 .RS 4
303 Shows output formatted as JSON\&. Expects one of
304 "short"
305 (for the shortest possible output without any redundant whitespace or line breaks),
306 "pretty"
307 (for a pretty version of the same, with indentation and line breaks) or
308 "off"
309 (to turn off JSON output, the default)\&.
310 .RE
311 .SH "EXIT STATUS"
312 .PP
313 On success, 0 is returned, a non\-zero failure code otherwise\&.
314 .SH "SEE ALSO"
315 .PP
316 \fBsystemd\fR(1), \fBsysupdate.d\fR(5), \fBsystemd-sysupdated.service\fR(8), \fBsystemd-repart\fR(8)