Koozali.org: home of the SME Server

Upgrade from 8.x to 9.1

Offline n9yty

  • 16
  • +0/-0
Upgrade from 8.x to 9.1
« on: February 23, 2016, 05:03:59 PM »
I have read quite a bit on this, but don't claim to have it all fully established yet... I want to build a roadmap for the upgrade though, and try to test it on a system before doing the actual server.  My primary driving reason is the need to get USB 3.0 support which I don't think is possible on 8.2 due to the version of Linux kernel.

As always, I deeply appreciate the work done by everyone on the project, and don't mean to interject a lot of stupid questions. I am happy to take advise and read more if pointed to the right places. But I will ask below based on what I have read to this point.

I understand there is no in-place upgrade due to CentOS restrictions. This is unfortunate, but can not be changed. As a side note, I have always felt this was a limitation of Linux for broader release, it really needs to have a way to make version-to-version ugprades easier for systems that you don't touch very often as a full reload/reconfigure is more troublesome when the memory fails as to what you did on them. :)  I know, my problem. :)

To that end... A few questions that have me wondering... Especially since I was not the only one involved with this particular server, so documentation is not guaranteed to be complete. :(

  * Only a Console backup can be restored upon initial install
    - Is this preferable to other options, doing install first then restore from Workstation/Desktop backup?
    - I wish USB 3.0 worked on v8.2. :) :) :)

 * Reinstall Contribs after restore
    - How to determine which contribs were installed?
    - Any way to verify first that they exist in 9.1, and function OK?

 * Delete & Reconfigure Manual tweaks
    - How to determine if any modifications were made?
    - What kinds of "tweaks" are contained here?
 
I am a fan of the recommended "it is recommended to carry out a test backup & restore upgrade first, to discover any problems", but being able to somehow enumerate what changes were made on the old server would be very helpful here... And I have not worked on this server for quite a while, or any SME Server, and others have possibly done things to it, so if there is any way to get even a basic automated list of what things may have been touched would be very useful.

If not, then I guess we just do the backup/install/restore and hope for the best. ;)

Thanks, and I apologize if I am just adding noise.
 Steve

Offline DanB35

  • ****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: Upgrade from 8.x to 9.1
« Reply #1 on: February 23, 2016, 05:24:44 PM »
  * Only a Console backup can be restored upon initial install
    - Is this preferable to other options, doing install first then restore from Workstation/Desktop backup?
I think it probably is, as the workstation backup requires you to install and reconfigure the server before restoring.  With the console backup, you don't need to configure anything, just restore.

Quote
* Reinstall Contribs after restore
    - How to determine which contribs were installed?
    - Any way to verify first that they exist in 9.1, and function OK?
/sbin/e-smith/audittools/newrpms will give you a list of RPMs installed that aren't part of the SME distro.  I'm not aware, though, of any way to tell which ones were intentionally installed and which were dependencies of something else.  The best way I know to confirm that they'll work with SME 9 is to check the wiki pages for each of the contribs.

Quote
* Delete & Reconfigure Manual tweaks
    - How to determine if any modifications were made?
    - What kinds of "tweaks" are contained here?

Here I don't think I can help you, because "manual tweaks" encompasses so many possibilities.  Manual tweaks to the config database will be backed up and restored.  Same with custom template fragments (though this may not be a good thing if a new software version in SME 9 wants something done differently--you can look for them in /etc/e-smith/templates-custom to see what's there).  But other things--config files for software installed without a contrib, for example--are hard to predict.

To be on the safe side, install to a fresh disk.  If it all goes sideways, you can always put the old disk back in and be where you started.
......

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Upgrade from 8.x to 9.1
« Reply #2 on: February 23, 2016, 09:36:46 PM »
n9yty

To add to what Dan said.
All previous versions of SME server have been upgradeable via CD/DVD/USB media or via yum (or rpm), this is the first version that cannot be upgraded that way due to changes in the underlying CentOS.

Doing a test upgrade is a good idea, it should show you any issues or problems, then you are prepared to resolve them on the real system.

The general theory is to temporarily move custom templates, & when you see the new server functioning correctly, add the custom templates back in, do a post upograde & reboot & test again. Do one at a time, that way you will see if the custom template changes are compatible with SME9 or if they need tweaking.
Remember once you have the SME9 running (after Restore) & say for example you see lots of error messages on the screen (at command prompt), you can open a second iteration of the console & troubleshoot & make changes in that second console.

Affa is another viable backup & restore alternative as is the default server manager backup, but both need to be installed & configured identically to the original SME8 server before you can do the restore.

Console USB is the simplest approach, but wait to be asked/prompted BEFORE you connect the USB drive.
Make sure the USB drive is formatted as Linux ext3 or ext4.

On first reboot after the new install of SME 9 OS, you will be asked if you want to restore from USB. Follow the prompts.

Quote
* Reinstall Contribs after restore
    - How to determine which contribs were installed?

This is something you do on the existing SME8.2 server

There are more tools than just newrpms

cd /sbin/e-smith/audittools/
ls -al

eg
/sbin/e-smith/audittools/newrpms
/sbin/e-smith/audittools/templates
& so on

Quote
    - Any way to verify first that they exist in 9.1, and function OK?

As well as wiki articles see the smecontribs repo for SME9
http://distro.ibiblio.org/smeserver/releases/9/smecontribs/
select your architecture

As part of your test setup, you can/would install all the required SME9 contribs & test them out.


Quote
* Delete & Reconfigure Manual tweaks
    - How to determine if any modifications were made?
    - What kinds of "tweaks" are contained here?

Who knows what "manual" tweaks have been made to the server ?
If previous admins have followed the SME guidelines, then they would have made custom templates with the required changes/tweaks, so do

/sbin/e-smith/audittools/templates

If an admin has directly tweaked conf files (naughty), then these will need troubleshooting manually.



Quote
I am a fan of the recommended "it is recommended to carry out a test backup & restore upgrade first, to discover any problems", but being able to somehow enumerate what changes were made on the old server would be very helpful here... And I have not worked on this server for quite a while, or any SME Server, and others have possibly done things to it, so if there is any way to get even a basic automated list of what things may have been touched would be very useful.

The above commands will give you a lot of information about additions (rpms/contribs) & changes (custom templates) that have been made to the old server, Run these commands on the old server before you upgrade. There are other tools/commands you can run also if interested.
When you see a contrib is installed, investigate to see that there is a SME9 compatible version. Many contribs required changes to suit different paths in SME9, but stephdl & others have done a lot of work to update contribs, still a work in progress though.


Quote
If not, then I guess we just do the backup/install/restore and hope for the best. ;)

This is not a bad approach, SME has supported upgrades for many years & usually works reliably, sometimes it is wise to move all custom templates to avoid errors on the first run after restore & then reintroduce them one at a time.
I would not be too cautious as you are doing a test upgrade, which I consider very wise given your situation, so you will discover any issues before they can have a serious impact on your production server.

On a good day, there may be no warnings !!!

One warning/advice to you, depending on the amount of data on your server, backup & restore may take a long time, many many hours, so please wait until the system advises you the backup is complete, & also that the restore is complete. If you cancel the operation before it has finished (even if you have been waiting say 18 hours & the system appears to have hung) then you will have problems & only have to repeat the whole exercise again. There have been many cases reported in these forums where people did not wait long enough.

It should go OK if you follow the guidelines.
« Last Edit: February 23, 2016, 09:40:09 PM by janet »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Upgrade from 8.x to 9.1
« Reply #3 on: February 23, 2016, 09:42:14 PM »
to obtain a list of the installed contribs, you can use this command (from CLI, logged as root)

Code: [Select]
yum list "smeserver-*" | grep '@smecontribs'

on a server of mine, it returns:
Quote
smeserver-BackupPC.noarch               0.2-1.el6.sme      @smecontribs
smeserver-dhcpmanager.noarch            2.0.4-2.el6.sme    @smecontribs
smeserver-fetchmail.noarch              1.6-7.el6.sme      @smecontribs
smeserver-mailstats.noarch              1.1-4.el6.sme      @smecontribs
smeserver-nfs.noarch                    1.2.0-10.el6.sme   @smecontribs
smeserver-password.noarch               1.2.0-9.el6.sme    @smecontribs
smeserver-qmHandle.noarch               1.4-4.el6.sme      @smecontribs
smeserver-remoteuseraccess.noarch       1.3-1.el6.sme      @smecontribs
smeserver-vacation.noarch               1.1-10.el6.sme     @smecontribs
smeserver-wbl.noarch                    0.3.0-10.el6.sme   @smecontribs

HTH

Offline n9yty

  • 16
  • +0/-0
Re: Upgrade from 8.x to 9.1
« Reply #4 on: February 23, 2016, 11:33:50 PM »
WOW!  MANY THANKS for the excellent advice, it will help tremendously!

I think everything has been covered with respect to my questions... I don't anticipate hand-edited configurations, I was thinking more of "approved" changes, but I just haven't touched the system in so long that I wasn't sure where to even look for those.

I don't anticipate a lot of modifications, certainly nothing outisde of normal ways of doing them, so this should not be a problem, especially doing it on a test setup as far as possible first.  We do have backups. :)