# Preparing the system for an Upgrade



## ccc (Aug 1, 2009)

hi

Howto preparing the system for an Upgrade, for example from 7.0 to 7.2?

Should I do first:
	
	



```
# portsnap fetch update
# portupgrade -a
```
before a system Upgrade?


----------



## graudeejs (Aug 1, 2009)

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html


----------



## ccc (Aug 1, 2009)

thx, but I'd like to Upgrade my system using *freebsd-update*:
	
	



```
FreeBSD Update

The freebsd-update(8) utility supports binary upgrades of i386 and amd64 
systems running earlier FreeBSD releases. Systems running 7.0-RELEASE, 7.1-RELEASE, 7.2-BETA, 7.2-RC1, or 7.2-RC2 
can upgrade as follows:

# freebsd-update upgrade -r 7.2-RELEASE

During this process, FreeBSD Update may ask the user to help by merging 
some configuration files or by confirming that the automatically performed merging was done correctly.

# freebsd-update install

The system must be rebooted with the newly installed kernel before continuing.

# shutdown -r now

After rebooting, freebsd-update needs to be run again to install the new userland components, 
and the system needs to be rebooted again:

# freebsd-update install
# shutdown -r now

Users of earlier FreeBSD releases (FreeBSD 6.x) can also use freebsd-update to upgrade to FreeBSD 7.2, 
but will be prompted to rebuild all third-party applications (e.g., anything installed from the ports tree) 
after the second invocation of "freebsd-update install", in order 
to handle differences 
in the system libraries between FreeBSD 6.x and FreeBSD 7.x.
```
 http://www.daemonology.net/blog/2007-11-11-freebsd-major-version-upgrade.html


----------



## DutchDaemon (Aug 1, 2009)

When doing minor version upgrades (like 7.x -> 7.x), the moment you upgrade ports doesn't really matter. Ports compiled under the previous minor version will continue to work under the next minor version (no major library revisions are done within a major version, only from one major version to another, i.e. FreeBSD 7 -> 8).


----------



## ccc (May 2, 2010)

DutchDaemon said:
			
		

> When doing minor version upgrades (like 7.x -> 7.x), the moment you upgrade ports doesn't really matter. Ports compiled under the previous minor version will continue to work under the next minor version (no major library revisions are done within a major version, only from one major version to another, i.e. FreeBSD 7 -> 8).



Thx, that means after version upgrade, like 7.x -> 7.x portupgrade -a is not necessary, but if I'll do an upgrade 7 -> 8, then I need after portupgrade -a?


----------



## wblock@ (May 2, 2010)

ccc said:
			
		

> Thx, that means after version upgrade, like 7.x -> 7.x portupgrade -a is not necessary, but if I'll do an upgrade 7 -> 8, then I need after portupgrade -a?



Almost.  After a major version upgrade, you have to force all ports to rebuild, which would be portupgrade -fa.  In practice, it's usually quicker to make a list of all installed ports, uninstall them all (pkg_delete) and then reinstall them from scratch.  Do a backup first, of course, and make sure you have copies of the config files in /usr/local/etc and maybe elsewhere.


----------



## jalla (May 2, 2010)

You can avoid upgrading ports even on major version updates by installing the compatibility libraries for the previous version(s).
i.e after upgrading to 8.x, install misc/compat7x from ports.

You may still want to upgrade all your ports, but at least the compat libs will buy you some time to do it, and keep your old binaries running in the meantime.


----------



## jb_fvwm2 (May 3, 2010)

If I was again upgrading v7 > v8 I would have
planned to rebuild everything depending upon
gettext. (Just a suggestion for anyone doing so
for whom it would not take too much time).
...........
Extrapolating, so many things depend on 
(jpeg, png, gettext, autotools, X, curl, perl)
that if one of them is going to be bumped
in a manner of instructions in UPDATING,
if I had a choice I would
V7 > V8 *then* do the ( gettext, jpeg.. or...)
upgrade.  
....
I could elaborate on the first paragraph if I had
a more precise timeline of port upgrades (here) during
2008/ 2009/ 2010...  Sorry.


----------



## ondra_knezour (May 3, 2010)

At first read /usr/src/UPDATING, it is best start for minor/major version update preparation. 

From this file 





> 20100323:
> FreeBSD 7.3-RELEASE
> 
> 20091129:
> ...



As you can see, there was some changes between 7.2 and 7.3 user should be aware about.

Also reading of relase notes at http://www.freebsd.org/releases/ will not hurt you


----------



## wblock@ (May 3, 2010)

jb_fvwm2 said:
			
		

> If I was again upgrading v7 > v8 I would have
> planned to rebuild everything depending upon
> gettext. (Just a suggestion for anyone doing so
> for whom it would not take too much time).



After a major version upgrade, the moment you upgrade one port, you have to upgrade all of them.


----------



## ccc (May 3, 2010)

Here is a good link:

http://www.cyberciti.biz/tips/howto-keep-freebsd-system-upto-date.html


----------

