# Best path from 6.2 to 8.0?



## geocrasher (Aug 2, 2010)

I have the need to upgrade a 6.2 server to 8.0 (as stated) and am not sure what the best upgrade path is.

I have a couple of possibilities in my mind: 6.2>7.2>8.0 or just build a new 8.0 server and migrate all the services over to that server. The issue is uptime. The 'new' server would mean downing our redundant backup server to rebuild it into the 'main' server for the switcharoo. Any suggestions/comments on this? 

Thank you oh great forum ones. I am at your mercy. (no sarcasm here, I am humbling myself to your wisdom)


----------



## fronclynne (Aug 2, 2010)

I would tend to agree with build a new 8.x server, migrate the services, _test_ everything, and then switch.  Make sure you have the ability to revert in case it all goes pear shaped.


----------



## phoenix (Aug 6, 2010)

geocrasher said:
			
		

> I have the need to upgrade a 6.2 server to 8.0 (as stated) and am not sure what the best upgrade path is.
> 
> I have a couple of possibilities in my mind: 6.2>7.2>8.0 or just build a new 8.0 server and migrate all the services over to that server. The issue is uptime. The 'new' server would mean downing our redundant backup server to rebuild it into the 'main' server for the switcharoo. Any suggestions/comments on this?



Ideally, create a clone of the running system, and then test the update process there.  One way to do this would be to:

upgrade from 6.2 to 6.4, no port recompiles needed
upgrade from 6.4 to 7.0
install the misc/compat6x port, so that you don't have to recompile your ports (if using a custom kernel, be sure to add the COMPAT_FREEBSD5 and COMPAT_FREEBSD6 options)
upgrade from 7.0 to 7.3, no port recompiles needed
upgrade from 7.3 to 8.0
install the misc/compat7x, so that you don't have to recompile your ports (if using a custom kernel, be sure to add the COMPAT_FREEBSD5, COMPAT_FREEBSD6, and COMPAT_FREEBSD7 options) 
ugprade from 8.0 to 8.1

The only downtime will be the reboots between installkernel and installworld steps.  The compatXX ports will allow you to keep running your old/existing ports on the new world/kernel.

Once that is done, you can either do an in-place recompile of the ports, or update the ports tree and update the ports as needed.

You would want to do this on a separate system and make sure it all works correctly, before trying it on the live machine (or simply swapping it in-place of the live machine).

Or, if you want a clean break/upgrade, just do a clean install of 8.1 on a new box, install the apps, copy the config files/data over from backups, test, test, test, and then make it live.


----------



## jb_fvwm2 (Aug 6, 2010)

Drivers you need may have been renamed, other
issues may arise.  Best to check the release
notes before each version bump... especially if
you have a custom kernel or stuff in
/boot/loader.conf or are using a serial port and
ppp.conf etc.


----------



## geocrasher (Aug 8, 2010)

Hello Gents,

Thanks for the notes Phoenix. I got them a few hours after we did the upgrade. We went from 6.2 to 7.2 then to 8.0

When we got to 7.2 there were library problems with pretty much everything. I started small, rebuilding my fav editor 'nano' and it works now. Apache, perl, php, etc do not. 

Do I need to uninstall those programs and reinstall? I don't think they were originally installed using ports, as they don't coincide with either the old or the newer ports version.

Thanks for helping me through my learning curve with FreeBSD. I like it, a lot (More than CentOS!) but I feel as though I'm starting over.


----------



## UNIXgod (Aug 8, 2010)

read /usr/ports/UPDATING


----------



## geocrasher (Aug 8, 2010)

UNIXgod I see the file, I understand what it means, but isn't it too little to late to go through all of that now? I'm not sure why you're directing me to it.

I tried to 'portupgrade -a'

and this is what I got

```
# portupgrade  -a
** Makefile possibly broken: databases/php5-mysql:
        /libexec/ld-elf.so.1: Shared object "libreadline.so.7" not found, required by "mysql"
        php5-mysql-5.2.11
        cannot install: unknown MySQL version:

/usr/local/sbin/portupgrade:1473:in `get_pkgname': Makefile broken (MakefileBrokenError)
        from /usr/local/sbin/portupgrade:623
        from /usr/local/sbin/portupgrade:614:in `each'
        from /usr/local/sbin/portupgrade:614
        from /usr/local/sbin/portupgrade:588:in `catch'
        from /usr/local/sbin/portupgrade:588
        from /usr/local/lib/ruby/1.8/optparse.rb:1310:in `call'
        from /usr/local/lib/ruby/1.8/optparse.rb:1310:in `parse_in_order'
        from /usr/local/lib/ruby/1.8/optparse.rb:1306:in `catch'
        from /usr/local/lib/ruby/1.8/optparse.rb:1306:in `parse_in_order'
        from /usr/local/lib/ruby/1.8/optparse.rb:1254:in `catch'
        from /usr/local/lib/ruby/1.8/optparse.rb:1254:in `parse_in_order'
        from /usr/local/lib/ruby/1.8/optparse.rb:1248:in `order!'
        from /usr/local/lib/ruby/1.8/optparse.rb:1241:in `order'
        from /usr/local/sbin/portupgrade:565:in `main'
        from /usr/local/lib/ruby/1.8/optparse.rb:791:in `initialize'
        from /usr/local/sbin/portupgrade:229:in `new'
        from /usr/local/sbin/portupgrade:229:in `main'
        from /usr/local/sbin/portupgrade:2213
```

Where do I go from here?


----------



## UNIXgod (Aug 8, 2010)

There sometimes specific instruction on how to deal with upgrading ports. Worst case you can always blow your ports away and start from scratch. Another note is to also read /usr/src/UPDATING ... I'm sure you already knew that though.

I always upgrade portupgrade first when doing a point release. then my shell and editor. finally go through each mission critical port (i.e. mysql, apache) before I do portupgrade -arR

repeat with your jails.


----------



## geocrasher (Aug 8, 2010)

Thanks for all the advice. I backed up, wiped out the ports, and am reinstalling everything from ports again. Some of the packages had been installed outside of ports and so this will make future maintenance easier.


----------

