Koozali.org: home of the SME Server

In-place upgrade from 6.0-1 to 7.2

Offline markehle

  • ***
  • 125
  • +0/-0
In-place upgrade from 6.0-1 to 7.2
« on: December 11, 2007, 05:31:22 PM »
Folks -

Our email/web/DNS server here at the library is running 6.0-1 and I would like to upgrade it to the latest version of SME. Since we rely on it pretty heavily for our operation (and it has never failed us - a great tribute to SME!), I don't want to screw it up. Currently, I am backing up using BackupPC from another machine. I am grabbing /home/e-smith/files/users, /home/e-smith/files/ibays, and /etc. What else, besides MYSQL should I be concerned about?

What would be my best bet as far as upgrading? Will 7.2 know what to do if I popped it in the cd drive and told it to upgrade?

Thanks!

Library Mark

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: In-place upgrade from 6.0-1 to 7.2
« Reply #1 on: December 11, 2007, 05:56:14 PM »
What would be my best bet as far as upgrading? Will 7.2 know what to do if I popped it in the cd drive and told it to upgrade?
That will almost certainly fail. I remember there were certain update instructions for upgrading from 6.x to 7.x releases. One of them was to remove all contribs installed on the machine as well as the custom templates in templates-custom and templates-user-custom (http://forums.contribs.org/index.php?topic=38543.msg174737;topicseen#msg174737).

It might be wise to not upgrade your system straight away as there have been some major problems with some people upgrading.

I suggest you make a backup of your server in the current state (just a safety feature I always do before making major changes). After that remove all installed contribs and custom templates and make an other backup, this  backup will be used to restore later on a new fresh install.
Shutdown the server and take out the old hard disk, mount a new clean hard disk and do a clean install of SME Server 7.2 (on this new disk), after that restore the 2nd backup (without the contribs/custom-templates) on this new system.

Make sure you use a backup routine that is implemented in the server as this will take care of dumping and restoring configuration parameters like users as well as MySQL data. Unfortunately I am not sure if the backup options for SME Server 6.0 and SME Server 7.2 (latest release) are the same, but to have all critical stuff a so called minimal backup would include at least the following elements:
Code: [Select]
etc/e-smith/templates-custom
etc/e-smith/templates-user-custom
etc/group
etc/gshadow
etc/passwd
etc/samba/secrets.tdb
etc/samba/smbpasswd
etc/shadow
etc/smbpasswd
etc/ssh
etc/sudoers
home/e-smith

To make sure you also have a valid dump of the MySQL data you can execute the following command before backing up your files:
Code: [Select]
signal-event pre-backupThis command should make a dump of your MySQL data and store it in /home/e-smith/db/mysql/ with a file for each database. If you make a backup with the build-in SME Server backup features (if possible due to file size limits) this should already been done automatically (as well as a restore of these files on your new install). If you do things manually you will probably have to install the dump files yourself as well (and probably need to reset yor root password as well).

Please do not install on your current harddisk as it will be hard to recover from a failed installation and you run a great risk of ending up with a non running server as well. By setting apart the extra hard disk (with the running 6.x system) you have an easy way of restoring a running system. If the update/installation fails you can easily take out the drive with the failed install and replace it with the old drive. Boot up your server and you should have your old copy running again. This way you have a fall back build in, in case thing go haywire.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline markehle

  • ***
  • 125
  • +0/-0
Re: In-place upgrade from 6.0-1 to 7.2
« Reply #2 on: December 11, 2007, 06:45:57 PM »
WOW - thanks for all the info! I never thought of pulling the hard drives out. The server is a Proliant ML370 so pulling them is a snap, and an excuse to get bigger ones.

Thanks again!

Library Mark

Offline markehle

  • ***
  • 125
  • +0/-0
Re: In-place upgrade from 6.0-1 to 7.2
« Reply #3 on: December 11, 2007, 06:53:58 PM »
While we are talking about it,. on my home server that I reload with great frequency because I use it to play with, i have never been able to make the webmail rules come back once I reload a machine. Where are they stored?

Thanks -

Library Mark

Offline raem

  • *
  • 3,972
  • +4/-0
Re: In-place upgrade from 6.0-1 to 7.2
« Reply #4 on: December 11, 2007, 10:45:18 PM »
markehle

Quote
...on my home server that I reload with great frequency.... i have never been able to make the webmail rules come back once I reload a machine. Where are they stored?

Webmail options are stored in mysql databases, so it sounds like you are not dumping the mysql dbs and restoring them.

A simple backup/restore solution you could use is in the wiki, which allows config to be backed up and restored without data in ibays & user data in user folders etc. You can tailor it somewhat as required.
In your case (assuming you install other contribs that use mysql dbs), then as you probably don't want certain mysql data, then it may be best to delete (or move) mysql dbs before doing a backup, that way unwanted mysql stuff is not carried across to your rebuilt server. Look in /var/lib/mysql/.... and delete (or move) the unwanted contrib dbs. You should stop mysql first, and restart it after.

See
http://wiki.contribs.org/Backup_server_config

Another way of approaching this, is to build a clean machine with basic setup eg webmail rules and limited users etc, and back that up using the method suggested. Then go ahead and play and make lots of changes etc. When you are ready to trash all that, just reinstall the sme OS and restore the backup from the clean original server.

Yet another way is to create your original server with minimal config & users eg webmail etc, make a clone of the hard drive using a disk cloning tool, and when you are ready to trash your server just restore the clone image to your drive. You need to use the rght clone tool/software that supports the volume type you use etc.
« Last Edit: December 11, 2007, 10:52:25 PM by RayMitchell »
...

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: In-place upgrade from 6.0-1 to 7.2
« Reply #5 on: December 11, 2007, 10:47:01 PM »
That will almost certainly fail.

Really? That's news to me. That would mean that we failed in an important design objective.

Quote
I remember there were certain update instructions for upgrading from 6.x to 7.x releases. One of them was to remove all contribs installed on the machine as well as the custom templates in templates-custom and templates-user-custom (http://forums.contribs.org/index.php?topic=38543.msg174737;topicseen#msg174737).

Yes, that's standard recommendation, as is making sure that you have a full current backup.

Offline byte

  • *
  • 2,183
  • +2/-0
Re: In-place upgrade from 6.0-1 to 7.2
« Reply #6 on: December 11, 2007, 11:04:31 PM »
What would be my best bet as far as upgrading? Will 7.2 know what to do if I popped it in the cd drive and told it to upgrade?

As long as you make sure your 6.x version is clean i.e remove/rename custom templates as per other threads in here and remove contribs then you can upgrade from a 6.x to an SME Server 7.2 as I tested this a month or so ago.

But remember "if it doesn't work" then please search our bug tracker as your issue may already be in the list, if not then please open a new ticket. Thanks.
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Offline raem

  • *
  • 3,972
  • +4/-0
Re: In-place upgrade from 6.0-1 to 7.2
« Reply #7 on: December 11, 2007, 11:13:25 PM »
markehle

There was a very long thread on 6 > 7 upgrades (6 pages) so read that for possible gotchas depending on your configuration.
See
http://forums.contribs.org/index.php?topic=30745.0

Make sure you read the last two or three pages, but keep in mind that the "restore from disk" method has been summarised in the following wiki article.

The restore from disk method allows you to keep your old system intact (just in case), and saves you many hours creating backups ie it restores directly from your mounted sme6 disk. It's listed in the FAQ.
see
http://wiki.contribs.org/UpgradeDisk


As you say you rely heavily on that server, then you may want to do a test upgrade first, discover and resolve any problems or user oversights, then do a live upgrade. If you use the restore from disk method, then your whole sme6 system is still intact and can be put back into service if you have any major hiccups.

The folders you backup are not really sufficient.
Do a complete backup using say the well proven dar2 contrib (add /opt as an inclusion in the backup job), as dar2 also includes a dump of all mysql dbs. If you accidently deleted the contents of your sme6 disk, then you have a full backup to rely on.

Just adding this note, as you are using sme6 then you would need to use a backup solution that runs OK on that OS, try the well proven backup2 contrib (ie backup2ws or backup2usb), and select a disaster recovery backup which includes the mysql dbs, and add /opt to it.
http://distro.ibiblio.org/pub/linux/distributions/smeserver/contribs/dmay/smeserver/6.x/contrib/backup2/
« Last Edit: December 11, 2007, 11:31:39 PM by RayMitchell »
...

Offline markehle

  • ***
  • 125
  • +0/-0
Re: In-place upgrade from 6.0-1 to 7.2
« Reply #8 on: December 12, 2007, 12:48:38 AM »
Man - you guys are the best!

As things would have it, I talked my boss into new hardware (she's going to let me spend up to $6K!) so I think that my game plan will be to load the new server with a naked copy of 7.2, and try to bring things over to it from the old server.

The old server is so hacked that I am not sure that it would upgrade without difficulty, so the safest option for me is not to touch it and replace it when the new server is ready.

Thanks again for all your help!

Library Mark

Offline raem

  • *
  • 3,972
  • +4/-0
Re: In-place upgrade from 6.0-1 to 7.2
« Reply #9 on: December 12, 2007, 02:55:01 AM »
markehle

You don't say how you plan to transfer config data etc, but if you have Windows workstations which have joined the domain (assuming your sme is a PDC), then make sure you bring across the machine accounts & profiles or you will need to run round to every workstation and disjoin & rejoin them from the domain and then setup new profiles for every user.

...

Offline markehle

  • ***
  • 125
  • +0/-0
Re: In-place upgrade from 6.0-1 to 7.2
« Reply #10 on: December 12, 2007, 12:53:04 PM »
This machine is not my PDC. In fact, right now I don't have a domain. We are a pretty small operation; I found having a domain more trouble than it is worth right now.

Offline markehle

  • ***
  • 125
  • +0/-0
Re: In-place upgrade from 6.0-1 to 7.2
« Reply #11 on: December 17, 2007, 09:39:36 PM »
OK - I think I have most everything ironed out, except the email thing.

I can get the folders over, and when I rename them from having a ';' in front to a '.', they show up just fine.

But - How do I transfer over the horde mysql database from 6.0-1 to 7.2? Looks to me that there were some major changes between the two. 6.0-1 uses imp for rules, and 7.2 used ingo?

Thanks -

Library Mark

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: In-place upgrade from 6.0-1 to 7.2
« Reply #12 on: December 17, 2007, 10:53:31 PM »
I can get the folders over, and when I rename them from having a ';' in front to a '.', they show up just fine.

You don't need to do that. "signal-event post-upgrade; signal-event reboot" will do that for you.

Quote
But - How do I transfer over the horde mysql database from 6.0-1 to 7.2? Looks to me that there were some major changes between the two. 6.0-1 uses imp for rules, and 7.2 used ingo?

If you did "signal-event pre-backup" before copying /home/e-smith/files, the "signal-event post-upgrade; signal-event reboot" will restore and then convert your horde db.

Offline markehle

  • ***
  • 125
  • +0/-0
Re: In-place upgrade from 6.0-1 to 7.2
« Reply #13 on: December 17, 2007, 11:56:55 PM »
Thanks, Charlie -

The problem with this server is the root mysql password is busted. I try 'signal-event pre-backup' and all /home/e-smith/db/mysql/mysql.dump contains is 'FLUSH PRIVILEGES;'. This box is pretty hosed.

I will try to get root back, but because this box has run so well for so long, I didn't want to risk screwing it up.

So - to recap, I run 'signal-event pre-backup' , then copy over everything in /home/e-smith/files, then run
'signal-event post-upgrade; signal-event reboot' and it will convert the mail directories and restore the mysql databases and ibays.

Right?
« Last Edit: December 18, 2007, 12:02:47 AM by markehle »

Offline markehle

  • ***
  • 125
  • +0/-0
Re: In-place upgrade from 6.0-1 to 7.2
« Reply #14 on: December 18, 2007, 01:23:30 AM »
hate to pester you guys again, but how do I backup and restore users? Does copying /home and running the above commands restore them, too? Or is there some files from /etc that I will need?

Thanks again!

Library Mark