# General hints for upgrades



## bmann (Sep 1, 2013)

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


----------



## SirDice (Sep 2, 2013)

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.


----------



## devildetail (Sep 2, 2013)

What kind of file systems you intend to use? My advice regarding this issues is always the same, use root on ZFS with support for beadm.  Using Boot Enviroments in combination with freebsd-update makes the task much easier. I suggest reading this post as introduction to this subject: http://devil-detail.blogspot.com.es/2013/07/freebsd-update-beadm.html.

Regards


----------



## bmann (Sep 2, 2013)

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.


----------



## junovitch@ (Sep 3, 2013)

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.


----------

