Jail maintenance: Difference between revisions
From wikinotes
Line 27: | Line 27: | ||
== Minor/Major Updates == | == Minor/Major Updates == | ||
<blockquote> | <blockquote> | ||
{{ NOTE | | |||
See <code>jail-update</code> executable, less typing. | |||
}} | |||
first update the host | first update the host | ||
<source lang="bash"> | <source lang="bash"> |
Latest revision as of 23:47, 2 June 2023
Updating Jail Packages
# Updating Packages # If all you're looking to do is to maintain your packages, # you can update all of your jails from your root system pkg -j wikinotes upgrade for jid in `jls | awk '{print $1}'`; do yes | sudo pkg -j $jid upgrade; done
Updating Jails
See also Freebsd release management
Patch Updates
freebsd-update -b /usr/local/jails/myjail/filesystem fetch freebsd-update -b /usr/local/jails/myjail/filesystem installMinor/Major Updates
NOTE:
See
jail-update
executable, less typing.first update the host
freebsd-update upgrade \ --currently-running 12.0-RELEASE \ -r 13.0-RELEASE # 1st run freebsd-update install sudo reboot # 2nd run freebsd-update install sudo pkg upgradenext determine the jail's version
# NOTE: # cat /etc/os-release # innacurate if freebsd-upgrade used # uname -a # innacurate, jails use host kernel freebsd-version # prints version (confirmed works for jail)next update each jail
freebsd-update \ -b /usr/local/jails/${JAIL}/filesystem \ --currently-running 12.0-RELEASE \ -r 12.1-RELEASE \ upgrade freebsd-update \ -b /usr/local/jails/${JAIL}/filesystem install service jail restart ${JAIL} freebsd-update \ -b /usr/local/jails/${JAIL} \ install pkg -j ${JAIl} upgrade