Changes

From SME Server
Jump to navigationJump to search
2,884 bytes added ,  15:40, 9 January 2015
m
Line 6: Line 6:  
Hard drive restore requires a complete system.  It is meant to take a hard
 
Hard drive restore requires a complete system.  It is meant to take a hard
 
drive from a system, mount it, and do a restore from it.  
 
drive from a system, mount it, and do a restore from it.  
 +
 +
It's always better to use a backup and restore from there, but...
    
It does not restore contribs or manually added software, except if it's in an Ibay and instructs you to move custom-templates. Pay special attention to contribs that store data files in /opt as this will not move automatically thus after remounting the old drive you may need to move the data files over after you have re-installed the contribs.
 
It does not restore contribs or manually added software, except if it's in an Ibay and instructs you to move custom-templates. Pay special attention to contribs that store data files in /opt as this will not move automatically thus after remounting the old drive you may need to move the data files over after you have re-installed the contribs.
    
The restore includes mysql databases even for contribs. Thus after the restore if you re-add the same contribs (save version too) then your contribs should be able to access their mysql database. If you upgrade the contrib at the same time then note that contrib's upgrade procedures for it's database. Note comment in regards /opt above.
 
The restore includes mysql databases even for contribs. Thus after the restore if you re-add the same contribs (save version too) then your contribs should be able to access their mysql database. If you upgrade the contrib at the same time then note that contrib's upgrade procedures for it's database. Note comment in regards /opt above.
 +
 +
This instruction is MUCH easier to use, when a SME 7x cd is used a an emergency recovery boot system.
    
=== Moving from SME 6.x to SME 7.x ===
 
=== Moving from SME 6.x to SME 7.x ===
Line 135: Line 139:     
All the usual warnings apply. Remember that any old contribs & templates will have to be reinstalled (assuming that they will work with V8)
 
All the usual warnings apply. Remember that any old contribs & templates will have to be reinstalled (assuming that they will work with V8)
 +
 +
=== Moving from SME 8.x to SME 9.x ===
 +
 +
SME 9 entails the same issues as SME 8 (see above):
 +
 +
With SME 8 being based on CentOS 5, assembling the RAID in rescue mode must be specified using the disk's UUID. If you have the SME 7 CD it will be easier to rename the Volume Group using it per the instructions below. Otherwise use the SME 8 procedure.
 +
 +
{{Note box|Before you start,  It might be worth fscking the disk/s to ensure that there are no errors.}}
 +
 +
# Make sure you have a very good backup
 +
# signal-event [[UpgradeDisk#Recovering_a_system_where_pre-backup_could_not_be_run|pre-backup]] on the old installation
 +
# Boot with a SME7 CD or SME 8 CD and only one of your original disks (in the case of a RAID1 arrangement)
 +
# As per instructions in "Boot from SME Server 7.1 (or newer) install CD" above :
 +
 +
Type "sme rescue" at the command prompt and hit enter
 +
 +
Note: don't start the network and skip mounting the filesystem.
 +
 +
If using SME 7 CD
 +
mdadm -AR /dev/md5 /dev/sdx2
 +
 +
If using SME 8 CD  (see [[bugzilla: 6195]])
 +
mdadm --examine /dev/sda# | grep 'UUID'
 +
mdadm -AR --uuid '''the:uuid:value:from:above''' /dev/md5
 +
 +
If using SME 9 CD  (see [[bugzilla: 6195]])
 +
mdadm --examine /dev/sda# | grep 'UUID'
 +
mdadm -AR --uuid '''the:uuid:value:from:above''' /dev/md5
 +
 +
Next Steps
 +
lvm vgscan
 +
lvm vgs -v
 +
lvm vgchange -a n
 +
lvm vgrename main new_vg_name
 +
exit
 +
 +
Now remove the CD and reboot into SME 9 :
 +
 +
mdadm -AR /dev/md5 /dev/sdx2 (n.b. you may find that /dev/md5 already exists)
 +
vgscan
 +
vgchange -a y new_vg_name
 +
mkdir /mnt/tmp
 +
mount /dev/new_vg_name/root /mnt/tmp
 +
 +
{{Note box|In some rare cases your VolumeGroup name listed in the last line might be different, more information can be found in [[[[bugzilla: 3883]]]].}}
 +
 +
You should now be able to view all your old data under /mnt/tmp
 +
 +
db configuration setprop backup Program CopyFromDisk status enabled
 +
signal-event pre-restore
 +
signal-event restore-tape /mnt/tmp (note: this step may take a long time depending on how much data is being restored
 +
signal-event post-upgrade
 +
signal-event reboot
 +
 +
Shutdown and remove old drive and reboot
 +
 +
All the usual warnings apply. Remember that any old contribs & templates will have to be reinstalled (assuming that they will work with V9)
 +
 +
January 2015: I was forced to use this method to recover a 6 year old server running SME 8, the hardware RAID had fried, not only listing a working RAID, AND leaving the second disk empty. It also deleted the last working disk! And NO usuable backups at all...
 +
Testdisk helped with the erased disk. I used a SME 7.6 disk to rename the vg. Using the procedure above on the same server with new disks took it's time, but: Everything works! Running the latest & greatest SME 9 now...
    
===Using a third drive===
 
===Using a third drive===
Line 167: Line 231:  
   service mysqld start
 
   service mysqld start
   −
===Reference information===
+
==Reference information==
 
Additional tips from http://forums.contribs.org/index.php?topic=39892.0
 
Additional tips from http://forums.contribs.org/index.php?topic=39892.0
 
which refers to http://forums.contribs.org/index.php?topic=37686.0
 
which refers to http://forums.contribs.org/index.php?topic=37686.0
6

edits

Navigation menu