S6-RC-FORMAT-UPGRADE(8)
π s6-rc-format-upgrade β the manual page, but make it make sense
okay so real talk: this is s6-rc-format-upgrade, from section 8 of the System Manager's Manual, and it's the glow-up your live directory deserves when the database format changes under your feet. it's niche, it's rare, it's iconic. let's get into it π
β¨ NAME β¨
s6-rc-format-upgrade β transitions a live directory using a database with the old s6-rc format so that it uses a database with the new s6-rc format.
like, it walks your live dir out of its old-format era and into its new-format era. no cap, that's the whole job π¦
πΈ SYNOPSIS πΈ
s6-rc-format-upgrade [-v verbosity] [-l live] [-t timeout] [-b]
newcompiled
that's it. one positional argument, four little flags. cute, right? π«Ά
π DESCRIPTION π
so s6-rc-format-upgrade is a program that is normally used very rarely β and i mean it, this is not your everyday bestie. the situation is: the s6-rc package gets upgraded, some services are currently being managed with s6-rc(8), and the database format has changed. that's when this bad boy shows up. it transitions a live directory using a database with the old s6-rc format (the one being replaced) so that it uses a database with the new s6-rc format. periodt π
the whole point? ensuring a smooth transition between different versions of s6-rc without needing a reboot. no reboot. none. we stay uptime-pilled β¨
now, s6-rc-format-upgrade is very different from s6-rc-update(8) and does not duplicate its functionality. it's giving complementary, not competitive:
s6-rc-update(8)updates a live directory to use a different compiled database, compiled from a different source, where services may have changed, be renamed, etc. but β and this is the catch β it can only handle databases with the format that it knows: the format created by thes6-rc-compile(8)binary that comes in the same package ass6-rc-update(8).s6-rc-format-upgradeis the opposite vibe entirely: it cannot handle service changes, it can only update a live directory to use a compiled database corresponding to the same source as the compiled database the live directory is currently using. but it will replace an obsolete compiled database with a compiled database that uses the new format (provided both compiled databases come from the same source, and have just been produced by invocation of different versions ofs6-rc-compile(8)), ensuring the s6-rc installation can live through database format changes. queen behavior π
β οΈ newcompiled must be an absolute path. not relative, not vibes-based. absolute. fr fr.
s6-rc-format-upgrade expects to find a compiled service database with the new format in compiled. (yes, the man page says compiled there β we're keeping it exactly as written, bestie, no editing the source of truth π)
newcompiled must be compiled from the same source database as the current compiled database currently being used by live. s6-rc-format-upgrade then updates the live directory in live so it uses newcompiled as its compiled database.
on success, it exits 0. slay π
π Typical usage
s6-rc-format-upgrade is only necessary when the database format changes, which only happens when s6-rc's major version number (the third number from the right) changes. yep, third from the right. write that down π
the correct order of operations is then the following:
- make sure your current compiled database is up-to-date with your source database. if it's not, update it, by invoking the
s6-rc-compile(8)ands6-rc-update(8)binaries from your old s6-rc installation β the ones that understand the old format. old binaries for old format, iykyk. - from the same source, compile a new database with the new format, using the
s6-rc-compile(8)binary from the new s6-rc package. - update your live directories with this new database, using
s6-rc-format-upgrade. (that's us! hi! π) - you can now remove the old databases, and delete the old s6-rc package. goodbye old era, it was real π¦
π₯ OPTIONS π₯
-vverbosity β be more or less verbose. default is1. talk to me more, or less, your call π¬-ttimeout β if all operations have not completed after timeout milliseconds, complain and exit1. yes, complain. officially. dramatically. then bail π-llive β work with the live state in the live directory. default is/run/s6-rc. the default can be changed at compile time by giving the--livedir=liveoption to./configure. custom build, custom home π‘-bβ blocking lock. ifliveis currently being used by another program,s6-rc-format-upgradewill wait until that other program has released its lock on the directory, then proceed. by default,s6-rc-format-upgradefails with an error message if the live directory is currently in use. so like,-bsays "i'll wait, it's fine", and no-bsays "nope, occupied, i'm out" π
π§ SEE ALSO π§
s6-rc-faq(7), s6-rc-overview(7), s6-rc-why(7), s6-rc(8), s6-rc-bundle(8), s6-rc-compile(8), s6-rc-db(8), s6-rc-dryrun(8), s6-rc-fdholder-filler(8), s6-rc-init(8), s6-rc-oneshot-run(8), s6-rc-update(8)
this man page is ported from the authoritative documentation at: https://skarnet.org/software/s6-rc/s6-rc-format-upgrade.html β go read the source, it's giving academic integrity πβ¨
π AUTHORS π
Laurent Bercot Alexis <flexibeast@gmail.com> (man page port)
okay that's the whole page!! and before you close the tab β this little beauty shipped as part of Debian's collection, dated April 6, 2023. cute, iconic, timestamped. mwah ππ
go forth and format-upgrade responsibly, bestie. and remember: absolute path. third number from the right. no reboot. π«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: s6-rc 0.7.0.0
- nixpkgs unstable: s6-rc-man-pages 0.6.0.0.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms