Koozali.org: home of the SME Server
Obsolete Releases => SME Server 8.x => Topic started by: bclayton on September 03, 2012, 01:44:24 AM
-
I have installed SME 8 and need to restore from the backup I made using the sever-manager panel to a USB drive. I have tried to follow the instructions in the USBDisk post using hal, but I am not sure I am doing it correctly. Are there other instructions. I have searched Google and don't find much. Thanks! I need quick help.
-
bclayton
You need to tell us more information and be much more specific.
If you used the standard (default) sme server manager Backup or Restore panel, then you had two choices.
Backup to desktop
Backup to workstation or connected USB drive.
Which did you use ?
In either case Restore can be made from the server manager panel.
If you did a backup to desktop (which creates a smeserver.tgz file) you can also restore at FIRST boot after a fresh install of the OS, when prompted. If you have already booted, then there is a workaround to reset that switch in the Howto referred to below.
the instructions in the USBDisk post using hal
Exactly which instructions are they, please provide a link.
If you used a backup contrib to do the backup eg DAR2, then you need to reinstall that contrib & configure the job database settings in order to do the restore.
You need to tell us more details so we can better advise you.
There are many more tips about backup and restore here:
http://wiki.contribs.org/Backup_server_config
-
Thanks, Mary.
Here is what I was following:
USB on SME 8
Things change on SME 8
It's difficult to work out what your device name is ie /dev/sda1
The mount point isn't automatically added in /etc/fstab
We use hal for the first and manually create and mount for the second
To find the device name, label, filesystem and the uid
#! /bin/bash
hal-find-by-property --key volume.fsusage --string filesystem |
while read udi ; do
# ignore optical discs
if test "$(hal-get-property --udi $udi --key volume.is_disc)" == "false" ; then
dev=$(hal-get-property --udi $udi --key block.device)
fs=$(hal-get-property --udi $udi --key volume.fstype)
lb=$(hal-get-property --udi $udi --key volume.label)
echo $dev": label "$lb",file system: "$fs ",uid: "$udi
fi
done
To check a mount point exists and mount
ll /media
mount /dev/sda1 /media/120Gbfat32 (ie. mount /media/120Gbfat32 no longer works)
ls -lh /media/120Gbfat32/
umount /dev/sda1 (when finished)
--------------------------------------------------------------------------------
The USB disk was backed up from the Backup panel in server-manager, which I assume uses DAR. I did not install any additional backup apps. I am not very proficient in Linux, it always just works, so any help appreciated. Thanks.
-
bclayton
I did not install any additional backup apps.
OK then.
The USB disk was backed up from the Backup panel in server-manager, which I assume uses DAR.
You did not answer which backup method you used.
To repeat the question:
If you used the standard (default) sme server manager Backup or Restore panel, then you had two choices.
Backup to desktop
Backup to workstation or connected USB drive.
Which did you use ?
-
Sorry. I used Backup to Workstation and then chose USB disk. Thanks.
-
Hi Mary,
Here is the most recent backup report. Perhaps it will help. Thanks again.
==================================
DAILY BACKUP TO WORKSTATION REPORT
==================================
Backup started at Sat Sep 1 01:00:04 2012
Backup of mysql databases has been done
Mounting backup shared directory localhost/media/USBdisk1
Backup temp directory /media/USBdisk1/tmp_dir/provue-server.midsouthcolor.com is mounted and is writable
Using set number 1 of 5
Attempt full backup
Backup base file name is full-201209010100
Making backup in temp directory
Using a backup session timeout of : 28770 seconds
--------------------------------------------
78400 inode(s) saved
with 0 hard link(s) recorded
0 inode(s) changed at the moment of the backup
0 inode(s) not saved (no inode/file change)
0 inode(s) failed to save (filesystem error)
255 inode(s) ignored (excluded by filters)
0 inode(s) recorded as deleted from reference backup
--------------------------------------------
Total number of inode considered: 78655
--------------------------------------------
Rotating backups in a new set /media/USBdisk1/provue-server.midsouthcolor.com/set1.
Moving backup files to target directory /media/USBdisk1/provue-server.midsouthcolor.com/set1
Updating backup configuration data
Backup successfully terminated at : Sat Sep 1 01:13:33 2012
-
bclayton
I used Backup to Workstation and then chose USB disk.
OK we are getting somewhere now.
So you have a fresh install of sme8.0 without any data and users & so on, and you want to restore from the USB backup, is that correct ?
Note you should ONLY restore to a clean install of the sme operating system, without data & users configured etc, except for any basic configuration needed to get the server talking to your network.
It seems the mount point on your previous (sme7) server was /media/USBdisk1
You do the restore using the same Backup or Restore panel in server manager, and select the appropriate option to restore from a backup made to workstation/USB disk.
You need to check that your USB disk is properly detected and mounted by sme8.
So if you connect the USB backup drive to sme8.0 and run these commands, what output do you see ? You can copy and paste all the following at the sme server root prompt if you are connected using Putty from a workstation, otherwise CAREFULLY type it in at the console command prompt.
hal-find-by-property --key volume.fsusage --string filesystem |
while read udi ; do
# ignore optical discs
if test "$(hal-get-property --udi $udi --key volume.is_disc)" == "false" ; then
dev=$(hal-get-property --udi $udi --key block.device)
fs=$(hal-get-property --udi $udi --key volume.fstype)
lb=$(hal-get-property --udi $udi --key volume.label)
echo $dev": label "$lb",file system: "$fs ",uid: "$udi
fi
done
Edit: PS I get something like this, but it will vary depending on what type of drives are in your system.
/dev/sda1: label USBBackup1,file system: ext3 ,uid: /org/freedesktop/Hal/devices/volume_uuid_677d030a_ec82_47b9_9710_f07495d2d8f6
-
Yes, it is a clean install.
When I run the code you sent, there is no response. I did make sure I had the latest updates installed. Thanks.
-
bclayton
When I run the code you sent, there is no response.
Is your USB drive connected when you run the code ?
Please show us the code you used, line by line.
You can see what you actually typed by pushing the up cursor arrow on the keyboard, to review each line you entered.
We want to see what you typed, NOT what is written in the wiki !
Check very carefully that what you typed exactly matches what is in the wiki, line by line, it works for me OK.
Also with the USB disk connected, run this command and show us the output.
fdisk -l
-
Mary,
The USB drive is connected. It is a 1 TB drive. Here is the output of both commands:
hal-find-by-property --key volume.fsusage --string filesystem | while read udi ; do if test "$(hal-get-property --udi $udi --key volume.is_disc)" == "false" ; then dev=$(hal-get-property --udi $udi --key block.device); fs=$(hal-get-property --udi $udi --key volume.fstype); lb=$(hal-get-property --udi $udi --key volume.label); echo $dev": label "$lb",file system: "$fs ",uid: "$udi; fi; done
Output from fdisk -l :
fdisk -l
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 fd Linux raid autodetect
/dev/sda2 14 30401 244091610 fd Linux raid autodetect
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 fd Linux raid autodetect
/dev/sdb2 14 121601 976655610 fd Linux raid autodetect
Disk /dev/md2: 249.9 GB, 249949716480 bytes
2 heads, 4 sectors/track, 61022880 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md2 doesn't contain a valid partition table
Disk /dev/md1: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Device Boot Start End Blocks Id System
-
bclayton
The USB drive is connected.....hal-find-by-property .....
That command appears correct and when copied and pasted works on my system, so that's being entered OK.
Output from fdisk -l :
OK looks like your 2 RAID1 drives are sda & sdb, but I see no sign of sdc, which is where I'd expect the USB drive to appear.
What make and model USB drive is it ? You need to troubleshoot why that does not appear in fdisk -l
Can you try connecting it to another sme8 test server ? Is it readable ? Has it failed ???
I have to go out now for an appointment so someone else please take over.
-
The drive is an I-Omega but not sure about the model. It is in a remote location and can check tomorrow. Is it now showing as /dev/sdb?
-
bclayton
Is it now showing as /dev/sdb?
Ooh sorry, I overlooked the sizes.
Do you have a 2 drive RAID1 array ?
If so then one of your disks has failed and the USB drive has been put into the array automatically.
If that is the case your USB backup has been wiped !
Alternatively you installed the sme OS with the USB drive connected, then it was added to the array, with the same outcome as above.
Do you have another backup ?
Please check the drive contents of sdb to be sure
-
Thanks so much Mary. I will check tomorrow to be sure.
I do only have one hard drive in the machine and I don't think the USB drive was plugged in when I did the install. I do have another drive that was mirrored in the 7.6 system but I uplugged it before installing version 8. I did try to boot from it and got strange characters on the screen and it did not boot. Would it possible still have data and just not boot? Again, thanks.
Brooks
-
bclayton
I don't think the USB drive was plugged in when I did the install.
Well fdisk does say that the USB (sdb) is part of the RAID array, and that's why the backup/restore cannot access it, as it is busy being a member of RAID1 array.
/dev/sdb1 * 1 13 104391 fd Linux raid autodetect
/dev/sdb2 14 121601 976655610 fd Linux raid autodetect
What does this show:
cat /proc/mdstat
I do have another drive that was mirrored in the 7.6 system but I uplugged it before installing version 8. I did try to boot from it and got strange characters on the screen and it did not boot. Would it possible still have data and just not boot?
Yes data may be retrievable, hold on to that, but that's another issue to sort that out.
Is the sme7 server still operating ? If so just do another backup.
I have to go !
-
Thanks, Mary
Here is the output of cat /proc/mdstat:
[root@provue-server ~]# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sda1[0]
104320 blocks [2/1] [U_]
md2 : active raid1 sda2[0]
244091520 blocks [2/1] [U_]
unused devices: <none>
[root@provue-server ~]#
Server 7 is not running any more, so no chance of producing another backup. Just have the disk that should have data but won't boot.
Any other suggestions? Thanks, Brooks
-
bclayton
Personalities : [raid1]
md1 : active raid1 sda1[0]
104320 blocks [2/1] [U_]
md2 : active raid1 sda2[0]
244091520 blocks [2/1] [U_]
That output seems to suggest that sdb is not part of the array.
Try to seperately mount the USB drive and see what data is on the drive. Instructions were in the sme8 USB notes.
Have you tested the USB drive with a drive fitness tool or similar to see if it is OK ?
Try smartctl
http://wiki.contribs.org/Monitor_Disk_Health
Build yourself another test server and mount the old sme7 drive and see what is on it, your data & email is possibly recoverable.
-
Thanks. I'll work try those suggestions today. I really appreciate all the help.
Brooks
-
Hi Mary,
Thankfully, I was able to get the server running again. From one of my earlier posts:
[ I do have another drive that was mirrored in the 7.6 system but I uplugged it before installing version 8. I did try to boot from it and got strange characters on the screen and it did not boot. ]
Well, I reconnected only that drive and ran the upgrade from the SME 8.0 CD successfully and all seems well. All the files and configuration seem correct.
I will now deal with the USB drive. Is the best approach to reformat and add to the system following the procedure in the USBDisk that we have been referring to? I'll also add a second hard drive.
I really do appreciate your help! Your comment about data possibly still being on one of the drives prompted me to try this.
Brooks
-
bclayton
Is the best approach to reformat and add to the system following the procedure in the USBDisk that we have been referring to? I'll also add a second hard drive.
I'd add the second disk (for RAID1) first, sync it using the admin console menu, & then reformat the USB backup drive as ext3.
-
The second drive is istalled and is now syncing up. I'll then follow your suggestion to reformat and add the USB back. Thanks.