Koozali.org: home of the SME Server

Upgrading vs new install + restore

schuitz

Upgrading vs new install + restore
« Reply #60 on: November 26, 2006, 01:17:56 PM »
Quote from: "burnat"
I believe that you need to upgrade from 5.5 to 5.6 first of all, then do a backup.  Use this backup to restore your data on the fresh install of vs7.  I have done a couple of these, but went all the way from 5.5 to 5.6, then 5.6 to 6.0, dfone a backup, then restored along the lines discussed in this thread. Had no problems, just time consuming.


I just wanted to post for posterity that I was able to follow the procedure described here from 5.6 straight to a fresh install of 7 without much difficulty (once I figured out that / was on partition number 6 of the v5.6 drive).  

However, for whatever reason, the primary ibay did not make it over, and hence the main website.  Investigating.

schuitz

Upgrading vs new install + restore
« Reply #61 on: November 27, 2006, 08:29:17 PM »
I should also mention that something happened to the samba machine accounts for the domain server, ie smbpasswd database is corrupt.  However this may very well be because I added machine accounts manually under 5.6. :hammer: My mind is a little fuzzy on that.

Anyway, some care is required in fixing this because XP user profiles can be handily blown away if you add the machine to the domain after the upgrade.  Beware!

Offline chris burnat

  • ****
  • 1,135
  • +2/-0
    • http://www.burnat.com
- 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.

schuitz

Upgrading vs new install + restore
« Reply #63 on: November 27, 2006, 11:08:58 PM »
Thanks, it sounds more like old tracker bug 1254663, https://sourceforge.net/tracker/index.php?func=detail&aid=1254663&group_id=96750&atid=615772, which appeared to have been fixed by Charlie in 7.0beta1.  Namely, machine accounts listed in smbpasswd are not in /etc/passwd after the restore from disk procedure outlined in this thread.

All of the machine accounts are listed in smbpasswd still.  But the machine has to be re-added to the domain for an entry to appear in /etc/passwd.

I'm a little thick on the purpose of secrets.tdb.  At any rate, if I get a chance I'll restore the old secrets.tdb and see if that resolves it.  However we don't have that many machines and I may just use the brute force approach.

Offline crazybob

  • ****
  • 894
  • +0/-0
    • Stalzer R&D
Upgrading vs new install + restore
« Reply #64 on: December 13, 2006, 04:00:24 PM »
Can I do something like this to move SME 7.0 Final to a new pair of hard drives?
Quote
1. On the old sme7 server prior to shutting down do
/sbin/e-smith/signal-event pre-backup
then shutdown & remove the drive
2. On the new machine do a fresh install of sme7.0 OS
3. Shut down & install one old 7.0 drive and start machine.
4. cd /
5. mkdir /mnt/tmp
6. mount /dev/hdb2 /mnt/tmp (adjust "hdb2" according to where the 7.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 sme7 drive


I want to use the existing hardware, just replace the existing hard drives. If I can do the disk to disk copy, it is much faster than the backup and restore.


Thanks

Bob
If you think you know whats going on, you obviously have no idea whats going on!

Offline kruhm

  • *
  • 680
  • +0/-0
Upgrading vs new install + restore
« Reply #65 on: December 15, 2006, 09:21:21 PM »
Hi Bob,

That looks good. Just be careful of the installed contribs (i had problems with modindex & httpd.conf at one point).

Once your certain they're reinstalled, you can move the custom templates back to their correct location and:

signal-event post-upgrade
signal-event reboot

Let me know if you have any problems

Take care,

Offline crazybob

  • ****
  • 894
  • +0/-0
    • Stalzer R&D
Upgrading vs new install + restore
« Reply #66 on: December 15, 2006, 10:19:00 PM »
I will give it a shot this weekend, and let you know how it works out.

Thanks

Bob
If you think you know whats going on, you obviously have no idea whats going on!

mackayr

Upgrading vs new install + restore
« Reply #67 on: December 16, 2006, 04:25:11 AM »
I'm trying to migrate my entire server to new hardware (single drive to single drive).  The approach in crazybob's post (two posts ago) seems to be what I'm looking for.  However, since I'm moving from and to the same version (ie. SME 7), is it necessary to remove custom templates?  Also, is it necessary to reinstall contribs or will they be migrated with the restore-tape procedure.  I've had limited success with backup2, most likely due to missed steps on my part, or installing different versions of contribs and this procedure seems to save a lot of time (ie. no "backup" is actually required - merely temporarily attach the old hd to the new server).  Please steer me in the right direction.

Thanks,

Rob

Offline raem

  • *
  • 3,972
  • +4/-0
Upgrading vs new install + restore
« Reply #68 on: December 16, 2006, 01:08:12 PM »
mackayr

> ...since I'm moving from and to the same version (ie. SME 7), is it necessary to remove custom templates?  

No

> ...is it necessary to reinstall contribs

Yes

>...will they be migrated with the restore-tape procedure.  

Installed contribs are not normally part of a backup and will therefore not be restored and so will need to be reinstalled.
The config  files associated with installed contribs usually are part of a backup & will be restored.

The concept of a full backup & restore, is that the backup is restored to a clean installation of the sme operating system, which by default does not have any contribs installed. Contribs must be therefore be reinstalled.


> I've had limited success with backup2.

You don't say what the limited success is related to.
If you mean restoring contribs, then the same comments as above apply. Contribs are not usually backed up etc...


The only "method" that will backup & restore your fully configured server (including installed contribs) is a "bare metal" disk clone, using an appropriate disk cloning or disk copying program. Linux has the dd command which will do a complete disk copy (slowly).
There are a number of references in the forums eg Mondo, or alternatively you swap out a disk of a RAID1 software array and use that as a backup.
...

Offline stephen noble

  • *
  • 607
  • +1/-0
    • Dungog
Upgrading vs new install + restore
« Reply #69 on: January 16, 2007, 04:30:20 AM »
There is a space in the new wiki FAQ for this topic

http://smeserver.sourceforge.net/sme7/manual
http://smeserver.sourceforge.net/sme70/sme70/Manual/FAQ?v=1b0h#h1094-5

It would be nice if these 5 pages could be distilled to the best method(s)

Offline marsa_matruh

  • ****
  • 249
  • +0/-0
Upgrading vs new install + restore
« Reply #70 on: January 16, 2007, 11:15:36 AM »
I did a backup/restore from 6.0 to 7.1. I mostly followed instructions at the beginning of the topic.

- Remove added rpm
- Backup
- Install 7.0 under vmware on my workstation
- Restore
- Disable all custom templates:

cd /etc/e-smith
mv templates-custom templates-custom.old
mkdir templates-custom

mv templates-user-custom templates-user-custom.old
mkdir templates-user-custom

signal-event post-upgrade
signal-event reboot

At this point, I had a small problem. There was no ethernet connection. ifconfig did not shown eth0. I went through the admin console. I did not changed any parameter. At the end, it asked me restart the server, like if something had been changed. I restarted and eth0 was back.

After 24h under vmware, I did :

- Backup from vmware.
- Install 7.0 on my server
- Restore

signal-event post-upgrade
signal-event reboot

Again, through the admin console to get back eth0.

Server is up and running. I am still doing small tunning, reinstalling rpm and thinks like that.


Offline byte

  • *
  • 2,183
  • +2/-0
Upgrading vs new install + restore
« Reply #72 on: February 22, 2007, 08:23:35 PM »
Dont know why this was removed as a sticky as it contained lots of useful information.

Super Mod can you replace back to sticky ?
--[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 stephen noble

  • *
  • 607
  • +1/-0
    • Dungog
Upgrading vs new install + restore
« Reply #73 on: February 23, 2007, 11:01:35 PM »

Offline tariqf

  • ****
  • 179
  • +0/-0
Re: Upgrading vs new install + restore
« Reply #74 on: October 19, 2007, 06:40:52 PM »
crazybob, your method is more or less sound however the mounting of the old sme disk will not work as the disk is RAID and LVM. If you try and mount it it will fail asking to specify the filesystem type.

If you switch the filesystem on the old drive to ext3 first then it will work ok but am not sure if you can ust use fdisk and force the type to ext3. Seem to remember doing something similar before but can't remember. Will let you know if I get a chance to test this idea.