Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: judgej on December 13, 2014, 12:03:26 AM

Title: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: judgej on December 13, 2014, 12:03:26 AM
I have a 7.6 that has got in a bit of a state after a failed 8.1 upgrade. It boots, but with lots of errors (CentOS kernel stuff), mail not working, webmail broken etc. but the accounts seem to be intact as are the ibays.

What I would like to do (and I believe this is one upgrade path), is back the system up, install 8.1 from fresh, then restore the backup. The problem is, I cannot find instructions on how to do this. Upgrade paths I have found include yum, CDROM upgrades, and various other processes for corrupted filesystems and other special circumstances.

Some questions - the Backup and Restore option on the admin panel offers only backup to desktop, which is not possible with over 400G of data on this server. The only other option that looks like it could back up, is Configure Workstation, except I don't want to configure a regular network backup, I want to backup to an attached drive. Or do I have to do it to a workstation?

I'm sure I've seen a page in the past that takes you through these steps, but I just can't seem to find it now. There are lots of instructions around the various docs that say, "if you have a backup then you can restore it here...". It is just getting that single USB backup done that I can't find.

PS Maybe my server is so messed up now, that I will just need to build a new one, create new users and ibays and transfer everything over manually. I certainly hope I don't need to do that, and that the backup/restore will take the data in a largely uncorrupted state. I can only try.

Last question: can a 32-bit backup of 7.6 be restored to a 64-bit 8.1 fresh server?

Edit: Hmm - SME 8 has a "Perform backup to removable media" option on the admin console. I'm not sure 7.6 has that, or am I imagining that?
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: guest22 on December 13, 2014, 06:54:47 AM
Maybe it's one of these pages that you are looking for?

http://wiki.contribs.org/Category:Backup (http://wiki.contribs.org/Category:Backup)
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: TerryF on December 13, 2014, 09:16:51 AM
As I recall 7.6 does have a Backup to USB device on the console, Item 8

AFAIK 7.6 back can be restored to a 64 bit 8.1 fresh install, what can't be done is an in place upgrade of a 32 bit 7.6 to a 64 bit 8.1
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: judgej on December 13, 2014, 01:15:20 PM
As I recall 7.6 does have a Backup to USB device on the console, Item 8

Thanks. I'm due to collect the machine this afternoon, so didn't have it in front of me to check. If it works for me, I'll add this to the docs.
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: judgej on December 13, 2014, 01:20:55 PM
Maybe it's one of these pages that you are looking for?

http://wiki.contribs.org/Category:Backup (http://wiki.contribs.org/Category:Backup)

That is the collection of just about everything I have found. There are a variety of backup solutions there (DAR, BackupPC, built-in backup etc) and I assume so long as I use the same method to restore as I do to back up, then it should work. I couldn't find the built-in backup to USB, but I think that is because it is in the console and not any of the GUI admin screens. I'll give that a go later today.

Thanks.
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: guest22 on December 13, 2014, 02:21:42 PM
http://wiki.contribs.org/SME_Server:Documentation:Administration_Manual:Chapter6
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: judgej on December 14, 2014, 11:17:20 AM
The "backup to USB device" has taken ten hours so far, and is only 31% the way through organising the files it is going to back up (i.e. it is doing lots of disk activity, but has not written anything to the USB ext3 drive yet). Should I hang on here, in the hope that it will finish in the next couple of days, or abort and use a different backup method? Will any of the others be faster for large drives?

I thought maybe the backup was somehow looping back to the main drive, but I can't see that growing in size.
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: TerryF on December 14, 2014, 11:46:53 AM
So simple question, how much do you have to backup.
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: judgej on December 14, 2014, 01:49:17 PM
So simple question, how much do you have to backup.

About 400G, which I know is going to take a while, even over USB3, anyway. The numbers of files, are probably up in the millions. I've already removed about 30G of archive ibays, and another 30G from the recycle bins.

After this, I really need to get an archive regime in place. A lot of these files are finished with, but may need to be referenced at some point in the future, but seldom are.

Do you happen to know at what point the console backup starts actually writing to the USB disk? It's at 47% at the moment, and still nothing is written. I guess it is creating an index of files to work through.
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: TerryF on December 14, 2014, 02:06:20 PM
I have a system that backs up approx 100gb to a windows PC workstation with an external USB2 drive..takes around 12hrs

Not sure of other question and should take more notice, you mentioned backup size in first post..:-)
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: judgej on December 14, 2014, 02:11:18 PM
Not sure of other question and should take more notice, you mentioned backup size in first post..:-)

Easy to miss in a wall of text :-) Thanks for the timings. I'm doing all this from home, without a UPS, so every switch I touch makes me very nervous, and doing the ironing this evening is going to be hell, because if anything is going to trip the power 98% the way through, that will be it...
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: guest22 on December 14, 2014, 02:19:21 PM
ever considered to make a bit for bit copy of the HD to another HD, and then play with backup and restore?
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: TerryF on December 14, 2014, 02:23:28 PM
Good idea HF, and good luck to judgej
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: judgej on December 14, 2014, 02:48:58 PM
ever considered to make a bit for bit copy of the HD to another HD, and then play with backup and restore?

Yes, I *should have* done that initially. I was actually doing a yum update with all drives in place, and that failed half-way through (console got thrown out), so what I had was two mirrored disks with a partially working system. So I've unplugged one drive as my backup now, but am messing with the other disk for now. An update from DVD did not fix it, and I just do not have the skills or time to untangle the 300+ packages that are installed or partially installed in the kernel.

I have learnt my lesson - never, ever do a yum update of more than a point-release without unplugging one of the RAID disks first :-(

So my aim now, is to treat the disk as a lump of accounts and data (and a barely bootable system - damn lucky it is not worse than this) and transfer everything to a fresh server.

Just as an aside, it was the POODLE SSL3 stuff that forced our hand in a quick update, after Thunderbird removed all support for SSL3 and TLS1, so we could not get to the mail through our normal clients. I think I was just in too much of a rush to get it done on Friday, and having taken other servers from 7.6 to 8.x using yum with no issues, was a bit too blasé about it. We live, we learn, we suffer for our IT sins. Well, I do.

I appreciate your help, and the suggestion of duplicating the disk was a good one, and I could have done that if I had not kept the RAID connected on my first attempt.
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: janet on December 14, 2014, 04:20:12 PM
judgej

The admin console backup to USB creates a single smserver..tgz file, so it may not write that until the whole file is created. With millions of files the CPU is probably very busy.
While the drive may be USB3, the USB port may only be USB2 or even worse configured for USB1.0.

In future you will be better off to use the server manager Backup to workstation option where you can select backup to a locally connected USB drive (please read the manual). Configure it to do a full backup & then daily incremental backups for a month or a few months or even a year. The first backup will take a long time but the daily incrementals may only take minutes or an hour depending how many files have changed.
Have a second USB drive to rotate every so often.

Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: judgej on December 14, 2014, 04:42:01 PM
judgej

The admin console backup to USB creates a single smserver..tgz file...

Ah, I see now. With the number of images on the server, this may well blow the available space limit on the internal HD before it moves the archive to the external drive. I'll give it another half hour to see exactly how fast it is filling up, and then may just have to abort and try the other method you recommend.
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: TerryF on December 14, 2014, 10:05:36 PM
Good advice Janet, hope you and Brad have a great Xmas :-)
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: janet on December 15, 2014, 01:34:14 AM
judgej

Quote
I'll give it another half hour to see exactly how fast it is filling up, and then may just have to abort and try the other method you recommend.

That will probably be a waste of time as you will have to start again & wait another 10 hours or more.
If this is an emergency backup you are trying to create, then it is probably best to be PATIENT & just wait for it to finish.

Note a admin console backup to USB is the simplest one to restore, as you are asked to connect the USB drive containing the smeserver.tgz backup file during the first boot of the newly installed sme9.0 OS.

If it's not yet clear to you from other comments & my comments, that backup is likely to take a VERY LONG TIME, maybe 12, 15 or even 20 hours at your current rate of progress.

Re the server manager Backup to Workstation, option to backup to local USB drive, the backup will take just as long to complete.
Note it will create a dar format file, or if you specifiy it, the backup can be broken into a number of parts, so a number of files.
Refer to Backup in the Manual.
This type of backup (xxxx.dar) can only be restored from the server manager panel & is not supported by the first boot restore option which is looking for a smeserver.tgz file
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: judgej on December 15, 2014, 01:40:51 AM
Well, it finished. It got down to the last few Gbyte of internal disk space and I quickly deleted a few extra Gbyte of files and it just squeezed on. If I hadn't removed those few files, it would have failed right at the last point due to lack of disk space. However, it did not write to the external USB drive, though the backup did go through the motions of telling it was done and to remove the external drive before continuing.

I've done a search and found the file in /mnt/bootstrap-console-backup/smeserver.tgz (361,045,093,935 bytes) I'm manually copying that file to the external drive now. Hopefully that is all a restore will need. There aren't any other files in there.

It took about 30 hours to create the tgz. I'm going to leave it overnight to copy to the external drive. It's a step forward :-)
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: TerryF on December 15, 2014, 03:36:19 AM
I would be a little "leery" with it not moving the backup file to the USB..any messages in the logs etc

If the file is OK, you can open it as it is just a standard archive, once copied see if it will open.
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: janet on December 15, 2014, 07:02:31 PM
TerryF

Quote
...hope you and Brad have a great Xmas :-)

Yes I hope Brad has a good Xmas too, whoever he is !
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: TerryF on December 15, 2014, 07:19:45 PM
So Janet not a fan of "The Rocky Horror Picture Show"..

"The tale of the newly engaged couple Brad Majors and Janet Weiss who find themselves lost and with a flat tire on a cold and rainy late November evening" and much more :-)

http://rockyhorror.com.au/   :shock:  :lol: :lol:
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: judgej on December 16, 2014, 01:50:09 PM
Phew! All done, and working :-)

So the story was:

1. Upgrade 7.6 to 8.1 using yum failed half way through. This left the server in a messy state, only half working.
2. Console backup to external hard drive took 36 hours for ~400Gbyte of data. Most of the file data was in the form of images, so it did not compress well. Backup to console writes the complete backup to the internal drive first, so make sure you have 50% free disk space. If you don't, take some files off the ibays, and remove Recyle Bin files.
3. The backup file did not transfer to the external drive once it was complete, probably because of the indeterminate state the server was in. smeserver.tgz was copied manually. Don't forget to format your external drive using ext3 to keep things simple.
4. Reinstalling SME8.1 (64 bit) from DVD just works, and that asks you if you want to restore a backup at the end. Just say "yes" and plug in the drive. This tool ~12 hours for the 300Gbyte tgz file, expanding to ~400Gbyte of files and emails.
5. The restored server had everything there, ready to go. Also 130+ yum updates to run.
6. Finally I removed the partitions from one of the old RAID disks (keeping one RAID disk aside with the old server on) and plugged it in. The "manage RAID" option in the console asks if you want to use it as a mirror - just say yes and it will sync up.
7. There will be a few contribs to install, but I aim to keep this server as lean as possible. Many years ago, when MySQL 3 and PHP 4 were cutting edge, it was a development server too. Web development tools have shot ahead these days, so development is done elsewhere, and the SME Server just handles emails and files, and nothing else.

That's it (apart from the backup strategy to put into place). Hopefully this will be useful to others stuck in this situation, with a broken server that still boots enough to do a backup. I'll try and get a few of the warnings and gotchas into the docs.

One last note - we used a free Zoho account to handle email while the server was offline. Now our server is back, I've kept the Zoho account as a backup MX. It is not a proper backup mail server, that would normally forward on the messages when your SME Server comes back online, but it's good as a free server to at least catch emails that may otherwise be lost when your broadband is down.
Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: TerryF on December 16, 2014, 02:01:46 PM
Now for a quite beer or two, sit back and admire your handywork :-)

That 36hrs would hve been a fun little interlude..

Title: Re: Upgrade 7.6 to 8.1 - can't find the correct instructions
Post by: judgej on December 16, 2014, 02:19:00 PM
Yes, that 36 hours was fun, especially at the end where it was down to the last few Gbyte of disk space and still writing the tgz file. If I wasn't there to check at that moment, and remove half an ibay to make some room, it would have failed at 99.9% and I'd have had to start again. I think I would have been on the beers a lot earlier then ;-)

The handiwork really belongs to to the thousands of man-hours that has gone into every aspect of SME Server. I was just leading it along, but the server and its components were doing all the hard work. This server will be ten years old next year, so I might throw it a party. It's not got a trace of the original hardware though, but it's still the same server, a bit like Trigger from Only Fools and Horses who got an award for sweeping the streets with the same brush for twenty years:

Quote
"And that's what I've done. Maintained it for 20 years. This old broom's had 17 new heads and 14 new handles in its time."
--RIP Roger Lloyd-Pack