Koozali.org: home of the SME Server

Upgrading vs new install + restore

Offline chris burnat

  • ****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Upgrading vs new install + restore
« Reply #30 on: August 02, 2006, 11:12:53 AM »
Quote from: "RayMitchell"

If you are removing the old drives anyway, then you might want to save yourself some time and use the Restore from disk feature in sme7. You can restore from the old hard disk (mounted) to your newly installed sme7 OS, without needing to go through the backup process (as I understand it).  http://bugs.contribs.org/show_bug.cgi?id=615


Tested this method today successfully, it was painless notwithstanding a number of contribs installed on the old sme6 server. Moved around 50GB of data in 45 minutes, and found users, ibays etc intact on the new box.  Reinstalled contribs and all seems fine.  I followed a howto found on contribs a while back, unfortunately I forgot where.  My thanks to whoever put this together, here it is:

On the new machine do the following:
1. Fresh install 7.0 {was 7.03)
2. Shut down.
3. Install old 6.0 drive and start machine.
4. cd /
5. mkdir /mnt/tmp
6. mount /dev/hdb2 /mnt/tmp (adjust "hdb2" according to where the 6.0 drive is installed).
7. /sbin/e-smith/db configuration setprop backup Program CopyFromDisk status enabled
8. /sbin/e-smith/signal-event pre-restore
9. /sbin/e-smith/signal-event restore-tape /mnt/tmp
(note: this step may take a long time depending on how much data is being restored)
10. cd /etc/e-smith
11. mv templates-custom templates-custom.old
12. mkdir templates-custom
13. mv templates-user-custom templates-user-custom.old
14. mkdir templates-user-custom
15. /sbin/e-smith/signal-event post-upgrade
16. /sbin/e-smith/signal-event reboot
17. Shutdown and remove old VS6 drive

And it works!  (':pint:')

Additional information (edited on 4/8/06):  When adding the old version6 drive to a full version7 system (Raid1), the old IDE drive may take precedence in the boot order, especially if the new system is built with SATA drives.  Check:
http://forums.contribs.org/index.php?topic=33093.0

Also (edited 4/9/06):
"Prior to removing the old drive, remember to run a pre-backup to dump mysql db"  Refer Ray Mitchell's post further down or check:
http://bugs.contribs.org/show_bug.cgi?id=615
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.

Offline raem

  • *
  • 3,972
  • +4/-0
Upgrading vs new install + restore
« Reply #31 on: August 02, 2006, 11:48:32 AM »
burnat

>...And it works!

Good one, but I'm sure Charlie & Gordon intended it to work !
...

Offline perelandra

  • *
  • 62
  • +0/-0
Successful upgrade
« Reply #32 on: August 04, 2006, 01:05:12 AM »
Hi folks,

yesterday I did a successful upgrade of my 6.01 to 7.0!! And it works "like a charm" (as there is a saying in english - iirc... :-) As you may see in the signature, it's a quite simple and average machine behind an ADSL-Router. I use it for our home network and for the hosting of several smaller and bigger websites (and since yesterday as a SlimServer :-)...

How did I upgrade?

Kruhm's thread here --> http://forums.contribs.org/index.php?topic=32381.0 "inspired" me and because I'm no geek I didn't fiddle out the comparison of original and additionally installed rpms. It was more a "trial'n'error" thing. So here I went:

1. Diskimage to new and bigger harddrive
2. Resize partition on new hardisk to use unallocated diskspace
3. Keep the old disk as a backup.
4. Remove BY HAND :hammer:  and  with --nodeps all additional rpms which did'nt appear in the install log of the first 6.01 installation (which I found in the root folder)... that took me some time and about two beers  :pint:
5. Rename the custom-template-folders to *.bak
6. Reboot from original 6.01-CD and do an upgrade with it to reinstall all the missing --nodeps-RPMS.
7. Test it with a reboot to see if it works: works with some small exceptions ("qmail-authentication-mod-thing" e.g.)
8. Put in 7.0 CD - perform a CD check - and do the upgrade
9. Reboot and enjoy! 3rd beer! :pint:

Maybe some of you laugh for this way is not very elegant. But as we say in Germany (and maybe also elsewhere?): "Alle Wege führen nach Rom!"

I'm so glad I did it! This is such a good work! WELL DONE!!!!

What I really like are some additional contribs and how they work:
- backup2
- remoteuseraccess
- awstats
- slimserver
- eaccelerator
- config apache error pages
- new phpmyadmin
- ...

and of course some of the basic functionalities:
- yum
- software installation
- antivirus and spam
- smtp-authentication @ provider
- and all the others I didn't discover yet!!!

Though it seems, that booting takes a bit longer and the OS needs better hardware... But for my kind of server it still seems fast enough!

I really love it! You are saving me a lot of nerves and time and also some money. Time to donate I think!

Hope I didn't forget anything! Anyway: I can sleep well now! Safe and sound...!

Cheers,
Johannes.
Greetings, Johannes

Offline ltc6netspec

  • ***
  • 72
  • +0/-0
    • http://www.lth6.k12.il.us
Upgrading vs new install + restore
« Reply #33 on: August 04, 2006, 07:56:41 PM »
Here is the qmail log:

2006-08-04 10:24:27.350359500 info msg 4657290: bytes 2078 from <xxxxxx@xxxxxx.xxx> qp 29749 uid 453
2006-08-04 10:24:27.366464500 starting delivery 16637: msg 4657290 to remote xxxxxx@verizon.net
2006-08-04 10:24:27.366468500 status: local 0/10 remote 1/10
2006-08-04 10:24:27.742314500 delivery 16637: failure: Connected_to_206.46.232.11_but_sender_was_rejected./Remote_host_said:_550_You_are_not_allowed_to_send_mail:sv3pub.verizon.net/
2006-08-04 10:24:27.813595500 status: local 0/10 remote 0/10
2006-08-04 10:24:27.911743500 bounce msg 4657290 qp 29751
2006-08-04 10:24:27.911746500 end msg 4657290
2

at9

upgrade...
« Reply #34 on: August 18, 2006, 10:29:18 AM »
Upgrade from v. 6.0

- Backup  - done
- Install 7.0 - done
- Restore...  - and here i have trouble - choose tgz destination and click submit - next page is epmty...standard error HTTP 404.
What is wrong?

Offline raem

  • *
  • 3,972
  • +4/-0
Re: upgrade...
« Reply #35 on: August 18, 2006, 11:34:04 AM »
at9

> - Restore...  - and here i have trouble - choose tgz destination and click > submit - next page is epmty...standard error HTTP 404.

Try a different browser eg Mozilla or Netscape.
Did you verify the backup file to prove it was OK immediately after doing the backup ?
Is the backup file larger than 2Gb, if so you may have trouble restoring from it.
How was the original backup done, using backup to desktop ?
...

at9

Upgrading vs new install + restore
« Reply #36 on: August 18, 2006, 11:49:19 AM »
IE - error; OPERA -  not reply (stop work);
BUT:
I didn't verify the backup file..
and
My backup have 2,8Gb.

Now i will try moziila and verify file...

Offline raem

  • *
  • 3,972
  • +4/-0
Upgrading vs new install + restore
« Reply #37 on: August 18, 2006, 12:02:37 PM »
at9

> My backup have 2,8Gb.

As far as I'm aware, there is a limit of 2Gb if you want to successfully restore files.
That's why the backup to workstation contrib is so poplular, you can limit the backup file size to 2Gb parts.

I suggest you redo the backup using backup2ws/backup2 contrib, assuming you still have the original server.
Alternatively remove some data and redo the backup to desktop to get the resultant file size below 2Gb.
...

at9

Upgrading vs new install + restore
« Reply #38 on: August 19, 2006, 10:36:16 AM »
Well, i deleted some mail (copy to other place) and sudennly my arch had 650MB :)  - four step done and WORK IT. Now i will test www with DB (all change I did on the second machine) I hope will be ok.
So big thanks for all here especially for RAY

Offline ltc6netspec

  • ***
  • 72
  • +0/-0
    • http://www.lth6.k12.il.us
Upgrading vs new install + restore
« Reply #39 on: August 19, 2006, 07:22:57 PM »
I have rebuilt a SME 7 3 times using the 1st method in this post.  Using the current backup from a SME 6 running for 3 years.  1400 accounts, less than 2 Gigs backup data.

The thing is I have never received the message on the bottom of the restore page saying that the "Restore is complete".   The last time I used console and TOP to watch for when the machine was done.  I've even let the machine sit for 18 hours while waiting for the "Restore is complete".

The question is will this make a difference in the configuration of all files and configuration data.  If it does, then what should I do?

At a lost now.  Because this machine has been zombie mass attacked 2 times.

Any suggestions appericated.

Ps.  I also have a SME 7 w/ 950 accounts that worked with the 1st method and " Restore is completed" showed up.

Offline raem

  • *
  • 3,972
  • +4/-0
Upgrading vs new install + restore
« Reply #40 on: August 20, 2006, 09:33:12 AM »
ltc6netspec

> I've even let the machine sit for 18 hours while waiting for the "Restore > is complete". The question is will this make a difference in the
> configuration of all files and configuration data.

If restore is not complete then all files have not been restored !

Did you Verify the backup file to check it is OK immediately after the backup ?
...

Offline ltc6netspec

  • ***
  • 72
  • +0/-0
    • http://www.lth6.k12.il.us
Upgrading vs new install + restore
« Reply #41 on: August 20, 2006, 11:22:24 PM »
Thanks for replying.

Unfortunely no  :-(

I had restored twice from two different backups.   I now no longer have the old SME 6.01, just before this second zombie attack everything seemed to be going so well.

  By the way, the SME 7 server with spamassin, qpsmtpd, and clamav held up trying, but the internet pipe was bogged down (10,000 messages a minute at peak).

Should I try to create a current backup of the 7.  Then do a verify and fresh install w/restore.  Or is there a way to generate a "registry cleanup" like windows products.

asjunk

Restoring MySQL
« Reply #42 on: August 21, 2006, 08:45:20 PM »
I used the method in Burnat's post, above, to facilitate my upgrade to 7.0.  Everything went well except that the mysql databases apparently didn't make the transfer (which is somewhat problematic, since there's a lot of data in those databases).   I read through the bugzilla entry 615, but couldn't make heads or tails out of it with relation to my problem.

Anyone have any suggestions on the best way to get the mysql databases from one hard drive to the other?  I must admit I'm a linux moron, and haven't even been able to figure out exactly where the hell the databases get stored.  I've tried using the phpMyAdmin contrib to export the databases, but that doesn't seem to work (rather than allowing me to save it as a file, it displays a text file; the text file, when pasted into a text document, doesn't seem to import properly although mysql doesn't give me any errors).

Thanks!

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Restoring MySQL
« Reply #43 on: August 22, 2006, 11:35:00 AM »
asjunk

>...the mysql databases apparently didn't make the transfer...
>.. I read through the bugzilla entry 615

Well the last 2 entries refer to your issue.
To quote from
http://bugs.contribs.org/show_bug.cgi?id=615

"Prior to removing the old drive, remember to run a pre-backup to dump mysql db"

As a workaround, you can copy the dbs from
/var/lib/mysql

You should stop mysqld first though, as open dbs wil not be copied.

/etc/init.d/mysqld stop

You may need to recreate correct permissions after the copy.
cd /var/lib
chown -R mysql:mysql mysql
...

at9

Problem with DB
« Reply #44 on: August 24, 2006, 10:51:47 AM »
Hi. First update to 7.0 was ok but my other arch (copy handly) was wrong and i must do it again.
The upgrate i did on the other server and IP was other too. When i change IP on two servers mysqladmin say that can't connect with DB.
I write in: mysqladmin -u root password "tralalala" and work ok. (each server).
I did new upgrade and now DON'T work...
"There seems to be a problem with the MySQL server, sorry for the inconvenience. We should be back shortly." - message PHP NUKE:)
What can i do??