FreeBSD Update/Upgrade from 13.1-RELEASE-p5

Hi,

I am planning to upgrade my FreeBSD on my home server and I read here on the forum a lot of posts where something doesn't work after upgrade. I am looking to upgrade to 13.2-RELEASE or possibly 14.0-RC2 or 15.0-CURRENT. I know 14.0-RC2 and 15.0-CURRENT are still being tested and are not recommended, especially on server environment. I am affraid to update and upgrade that half of my things will stop working. My question is how to perform this process including backup so I won't be suffering from spending few days on full reinstall like last few times couple years ago. Please not I am not using GENERIC kernel and ZFS file system. With choosing version I would prefer something where I will just update packages and patch kernel rather then looking for some help again for full upgrade (Long term support)
The way I would do is
1. Find some software for full system backup and search on google for some howto - ie. clonehdd
2. freebsd-update fetch
3. freebsd-update install and perform restart
4. freebsd-update -r 13.2-RELEASE upgrade and perform restart
5. I would search for config file to copy and compile kernel again after upgrade

I don't really know what files and directories I should backup - /etc/ and /usr/local/etc for sure I will copy to my laptop but what else is important?
I will appreciate for step by step tutorial as last few times I followed guides like https://docs.freebsd.org/en/books/handbook/cutting-edge/ and I did have to reinstall full system.
Even I really hate windows but I like that when you run update there is no issues after updating system, with FreeBSD I always had some problems.

Thanks,
Seb
 
and I read here on the forum a lot of posts where something doesn't work after upgrade.
When you go to a bakery, you will find lots of people ordering bread related products. If you go to a butcher you will find lots of people ordering meat related products. When you go to a support forum you will find lots of people posting problems. It's called base rate fallacy. People that don't have problems generally don't post to support forums.

4. freebsd-update -r 13.2-RELEASE upgrade and perform restart
This doesn't actually upgrade anything yet. It just downloads and prepares the upgrade. You need to run freebsd-update install twice in order to actually install the upgrade.


I will appreciate for step by step tutorial as last few times I followed guides like https://docs.freebsd.org/en/books/handbook/cutting-edge/ and I did have to reinstall full system.
Don't go there. It's not for you. Use freebsd-update(8) and stick to -RELEASE versions.
 
I don't really know what files and directories I should backup
If you want to have a chance to restore your backup quickly then backup everything.
I prefer to use net/rsync to synchronize every file to the backup location.
Sometimes it may be too hard to restore some custom installation having only configs like /etc/ /usr/local/etc/ because you may have some issues with new software and some issues with installing some old/outdated versions of software.

Try to clone your server to some virtual machine on the separate computer.
After that you will have a backup and a chance to test your upgrade process running it on the backup.

P.S. can you specify your current version of FreeBSD?
 
Please note, FreeBSD bug 273950 – freebsd-update rollback (from 14.0-BETA2 back to 13.2) fails

… I don't really know what files and directories I should backup - /etc/ and /usr/local/etc for sure … what else is important? …

hier(7) is the primary point of reference for the file system hierarchy.

The link above is for FreeBSD-CURRENT. 6th July 2023 edition, at the time of writing.

/home/ in FreeBSD 14.0 is technically different from /home/ in 13.2-RELEASE. That aside, the page for CURRENT should be true enough for 13.2.

The hier(7) page that's more commonly seen is currently outdated.
 
Thanks for your reply, I simply packed all /etc/, /usr/local/etc, /home/, /var/, /usr/src/sys/, /boot/ and vms into tar and copied it to my laptop just in case (around 135GB in total). Then I have updated 13.1 with all patches and upgraded to 13.2-RELEASE. After upgrade I have checked if there is any updates but it was up to date. I had some issues regarding my pf as it loaded GENERIC kernel after update but as soon as I compiled custom kernel with ALTQ it's working fine so far. I was a bit worried because with my machine there is an issue in FreeBSD related to RAID controller and I spent few days reading and searching how to solve the issue and turns out I did have to add to /boot/loader.conf line "hw.mfi.mrsas_enable="1"" otherwise it was freezing system and I was unable to use my HDDs. That's why I was looking for some good backup in case my system won't boot or there will be some issues. I am just simply not aware of what is being changed in the system after upgrade and I am not sure what files are "replaced" with new system version.

im version I was using was 13.1-RELEASE p5, updated to 13.1-RELEASE p9 if remember correctly and now it's 13.2-RELEASE p4.

When I have to compile kernel after update or after upgrade do I need to duplicate GENERIC as EXAMPLE again or my old EXAMPLE conf I can still use to run buildkernel and installkernel? I am not sure wheter update or upgrade will add some additional lines in the conf file (for example in new kernel some devices were added) so I have copied GENERIC into my EXAMPLE and then I adjusted to what I need.

I am still looking for some software for my backup to perform it like for example once a week just in case.
 
An include directive is available for use in configuration files. This allows another configuration file to be included in the current one, making it easy to maintain small changes relative to an existing file. If only a small number of additional options or drivers are required, this allows a delta to be maintained with respect to GENERIC, as seen in this example:
Code:
include GENERIC
ident MYKERNEL

options         IPFIREWALL
options         DUMMYNET
options         IPFIREWALL_DEFAULT_TO_ACCEPT
options         IPDIVERT
Using this method, the local configuration file expresses local differences from a GENERIC kernel. As upgrades are performed, new features added to GENERIC will also be added to the local kernel unless they are specifically prevented using nooptions or nodevice. A comprehensive list of configuration directives and their descriptions may be found in config(5).
 
Upgrade process from 13.1 to 13.2 usually should not have any major issues.

Tar backup is better than nothing, but it saves only files and does not saves all required info like owner, flags, hardlinks, some files with non-english symbols in their names, etc.
So it is possible to restore a complete system from the tar archive, but it may be not so easy.
 
Back
Top