General hints for upgrades

Hello,

I'm totally new to FreeBSD and I'm preparing my first server on it. As I'm digging in handbook and forum to find the proper upgrade paths, I would like to ask for any hints and correction in my understanding to whole process.

I will have a production server with limited resources etc. so I will not compile anything here and use packages on this server. In this scenario I should be fine with freebsd-update for patches to kernel, world and packages. It should take care of upgrades between version too. Right?

As I'm starting with FBSD FreeBSD I will have one test server in VirtualBox for testing before I touch the production server. If any package will be older than the port (and not update), I will then compile it on the test server and install to the production one. I think about compiling my own kernel too.

So final design:
  • production server only with packages (no sources, no ports);
  • if it will be needed, then compile ports on the test server, create packages and install them on the production one with pkg_add;
  • compile a custom kernel on the test server and move it to production to the /boot/kernel directory.

Upgrades:
  • freebsd-update on production will upgrade world and installed packages from a repository;
  • my own created packages I will update manually when suitable;
  • if a kernel update is needed, I will recompile it on the test machine and move to production.

At the end I should have actual packages and a custom kernel from actual sources. I'm now running with a custom kernel and have no problem for now.

Can you tell me if I'm missing anything in my process and if it can work for me?

Thanks for any hints.

rgds Regards,
bmann
 
Depending on your network it may be easy to NFS export /usr/src/ and /usr/obj/. Both can be exported read-only. You can then mount them on the production server and run install(world|kernel) there to update it.
 
I will use UFS, because I'm not familiar with ZFS at this moment and due to limited memory on the server. But I got the point with the beadm article.

I will use VPS and it will be somewhere at the provider and due to it the NFS is not an option either. I will not need many packages so it is not a big deal for me to create the packages on a/the test server. As I'm starting with FreeBSD I'm not sure, if there is any fault in my logic for updates and upgrades.
 
freebsd-update is only useful if you are running a GENERIC system. If you absolutely must use a custom kernel then you'll have to compile it. If you can't use NFS as you said, consider doing all the compiling on a test machine and using net/rsync with archive and delete set to update the /usr/obj and /usr/src directories. Then it's just a matter of install(world|kernel) and mergemaster to keep everything up to date.

As far as packages, consider ports-mgmt/poudriere for compiling your own package repository with the particular options that work for you. If you do convert to pkg, it would be very easy to do a # pkg upgrade command on your server and get up to date.
 
Back
Top