How not to upgrade your system with freebsd-update

It kind of royally confuses the system....

1. Have a cron job that runs "freebsd-update cron" every night at 23:10.
2. Run "freebsd-update upgrade -r 12.3-RELEASE" before 23:10
3. Run "freebsd-update install" some time after 23:10
4. Reboot

Ah the fun...

Other fun ways others have tried? :-)

(I do think it would be nice if "freebsd-update cron" had some way to notice an "upgrade-in-progress" and perhaps skip doing what it does...)
 
Just do it interactively. It's easy. Read the manual. freebsd-update(8)

Edited to add:

Do your upgrades right after the backup. Always have a good recovery strategy ready to go.

Minor upgrades are pretty routine. Upgrading to the next major point release requires planning and more time.
 
Just do it interactively. It's easy. Read the manual. freebsd-update(8)

Edited to add:

Do your upgrades right after the backup. Always have a good recovery strategy ready to go.

Minor upgrades are pretty routine. Upgrading to the next major point release requires planning and more time.

Yes, well, that was not the point. The reason we've been running "freebsd-update -t root cron" from ... cron is that it just downloads the updates and sends an email to root if there are updates to install. Then you normally do a "freebsd-update install" whenever is convenient.

However... if doing a release-upgrade then this causes the packages that "freebsd-update upgrade -r ...." downloaded to be replaced/mixed up with the ones downloaded by "freebsd-update cron" - if the cron job happens to come inbetween the "upgrade" and "install" commands... :-)

Anyway, I was looking for other creative ways you've caused upgrades to go wrong - fun for beer-time war-stories :-)
 
I am also thinking of doing the updates automatcilly via cron....
But I am not aware of this is a good idea.

(At least for particulary packages some may be set first to "not to be updated or removed" because some packegs I don't want packages updated or autoremoved, waht also could happen (see man pkg)

Instead of let cron doing the commands directly with a waiting period I may suggest to place those freebsd-update commands into tiny shellscripts that cron will execute instead.

You also could include the pkg upate / portsnap fetch commands and let the first script (#freebsd-update fetch - "look and get all updates") write afterwards a small file (timestamp to /tmp ... something)
Another script started periodically via cronjob checks if this file exists an updated status and if so executes #freebsd-update install ("install the updates").


That may prevent possible collisions if the first job wasn't done (slow/aborted/no internet connection to server) and then starts the next directly afterwards if it's done without errors instead of betting on approximated waiting periods.
 
If you do not want to use freebsd-update, just setup pkgbase and update with pkg at your own risk (still in beta, some caveat : see the docs)
 
… pkgbase … still in beta, some caveat : see the docs)

Maybe better to think of PkgBase as alpha (in main, and so on). If you're aware of something that I'm not, please add to this topic:

 
Back
Top