Below is an abridged/tweaked version of the instructions found here: http://www.daemonology.net/blog/2007-11-10-freebsd-minor-version-upgrade.html
Note: this procedure may be performed via an SSH session - but if your sshd_config needs manual merge (see below), and you screw it up, this could be problematic.
Warning: freebsd-update creates creates a work directory in /var/db/freebsd-update. This can get large (approx 800Mb as of December 2014). Ensure to have at least 1Gb of free space on /var before using freebsd-update. If this is not feasible, it's possible to change the location of the work directory.
mkdir /var/db/freebsd-update mkdir /usr/upgrade cd /usr/upgrade fetch http://www.daemonology.net/freebsd-update/freebsd-update-upgrade.tgz fetch http://www.daemonology.net/freebsd-update/freebsd-update-upgrade.tgz.asc gpg --verify freebsd-update-upgrade.tgz.asc freebsd-update-upgrade.tgz
Check the signature - do not continue if the signature does not verify. GPG must be installed to do this.
tar -xf freebsd-update-upgrade.tgz sh freebsd-update.sh -f freebsd-update.conf -r 6.4-RELEASE upgrade
Note the -r parameter - this determines the distribution to upgrade to. It must exactly match the name of the target distribution (as seen on the FreeBSD website).
If the merge needs manual assistance, you'll end up in vi. This will happen for each file requiring a manual merge. For each conflict in each file (there may be more than one conflict, and/or more than one file), the old and new versions are shown. The lines between the "<<<<<<< current version" line and the line consisting of "=======" are the existing lines in the file which are in conflict; the proposed replacement for these lines is below the ======= line. Delete everything except those lines you wish to keep. Delete the "current version" line, the ======= line, and the ending ">>>>>>> 6.4-RELEASE" line. Ensure to locate and resolve every conflict. Failing to remove the "current version" line and other bits will leave them in the file, which may or may not affect things, depending on the file.
In the example below, the line "#VersionAddendum FreeBSD-20050903" is in conflict with the line "#VersionAddendum FreeBSD-20061110":
<<<<<<< current version #VersionAddendum FreeBSD-20050903 ======= #VersionAddendum FreeBSD-20061110 >>>>>>> 6.4-RELEASE
To resolve this conflict, delete everything except the correct line:
sh freebsd-update.sh -f freebsd-update.conf install reboot
cd /usr/upgrade sh freebsd-update.sh -f freebsd-update.conf install
If a message appears, "Completing this upgrade requires removing old shared object files.
Please rebuild all installed 3rd party software (e.g., programs
installed from the ports tree) and then run "freebsd-update.sh install"
again to finish installing updates.", then do the following:
make install clean
sh freebsd-update.sh -f freebsd-update.conf install
Note: if, during the portupgrade install, autoconf fails with the error "Excess arguments to built-in `_m4_popdef' ignored", the fix is to install GNU m4 manually, then re-run the portupgrade install. This fix from here.
Examine carefully the summary generated at end by portupgrade - if any ports failed to rebuild, these must be reinstalled manually (the port probably will no longer operate correctly).
See also the portupgrade docs.
/etc/hosts /etc/ssh/ssh_config /etc/ssh/sshd_config /etc/inetd.conf /etc/mail/sendmail.cf