Koozali.org: home of the SME Server

Restoring Data Question- SME 6.0.1

Offline edb

  • *
  • 548
  • +0/-0
Restoring Data Question- SME 6.0.1
« on: October 27, 2005, 04:30:11 PM »
I'm using BackupPC for backing up my data on a daily basis and I'm backing up the following folders [/home','/var','/etc','/opt','/plus','/root','/usr','/bin','/sbin','/lib','/boot','/command','/service'].

My question is:

If my SME v6.0.1 server goes down for any reason I would like to be confident that that data I have been backing up will be all I need to get things to the same state as they were prior to the disaster.

In other words, if the server goes down and I throw in a new hard drive, install SME from CD again - can I just restore the data from my BackupPC server to the SME server and have it running again where it left off?

Or are there steps that I have missed?

Another example is if the SME server was using a single SCSI drive and the new drive is IDE. What steps would be required?

Thanks for any input
......

Offline azche24

  • *
  • 163
  • +0/-0
    • http://az-law.de
Re: Restoring Data Question- SME 6.0.1
« Reply #1 on: November 01, 2005, 03:29:50 PM »
Hi,

your choice of directories is quite ok.

But restore will only work in your described way, if that is a clean system with no additional contribs installed.

If not, you have to reinstall SME plus the contribs first.

In some cases you have to

a) reinstall SME
b) reinstall contribs or additional rpms
c) restore your backup
d) do a SME Installation from CD again -> Upgrade Option to check the hardware.

In very rare cases you have to reconfigure the server via admin-tool. E.G. if you changed network-cards or basic configuration. That's all.
Alexander Ziemann, Berlin - DE

Offline edb

  • *
  • 548
  • +0/-0
Restoring Data Question- SME 6.0.1
« Reply #2 on: November 01, 2005, 08:59:29 PM »
Thanks for your reply Alexander

That's what I thought.
I have many additional contribs installed and maybe it would be best if I listed all installed rpms and pipped the output to a text file to refer to later on. That way I'll know what packages I need to install to get it back up to date.

Ed
......

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Restoring Data Question- SME 6.0.1
« Reply #3 on: November 02, 2005, 09:00:37 AM »
edb

> ....I would like to be confident that the data I have been backing up will be all I need.....

The only way to be totally confident of that is to actually test your recovery process.

Try to restore to a clean system and see what happens, that way you will discover any problems with your backup routine while under less critical test conditions.

You can then rectify any problems discovered and subsequently be more confident of recovery success under critical real world conditions.
Many problems have been discovered with backup files & procedures when it is too late to do anything about it, resulting in major data loss.
...

Offline azche24

  • *
  • 163
  • +0/-0
    • http://az-law.de
Restoring Data Question- SME 6.0.1
« Reply #4 on: November 02, 2005, 11:07:48 AM »
Hi again, Ed:
Quote from: "edb"

I have many additional contribs installed and maybe it would be best if I listed all installed rpms and pipped the output to a text file to refer to later on.
Ed

If your server is highly modded (many contribs, own scripts) the best basic backup would be a disk-image. I use acronis for that, but i think every similar tool will do (ghost or similar linux-tools).

I bought a simple external 160GB HD, boot from acronis cd and the rest is a very quick backup.

With today's tools i would not recommend file based backups for disaster recovery any more.

And if you really want to know: Test a restore on some old PC!
Alexander Ziemann, Berlin - DE

Offline edb

  • *
  • 548
  • +0/-0
Restoring Data Question- SME 6.0.1
« Reply #5 on: November 03, 2005, 03:41:25 AM »
Hi Alexander,

I bought trueimageserver8.0_s_en.tar.gz today but got the following error on install:
Acronis True Image Setup has not found precompiled
snapapi module for the running kernel. It is suggested
to compile it now.
Can't find kernel source directory:
 /lib/modules/2.4.20-18.7/build

Just wondering how you got around this error when you installed your version?

Thanks

Ed
......

Offline azche24

  • *
  • 163
  • +0/-0
    • http://az-law.de
Restoring Data Question- SME 6.0.1
« Reply #6 on: November 03, 2005, 10:12:54 AM »
Hi,
Quote from: "edb"
Just wondering how you got around this error when you installed your version?
Ed

I did not install anything. I take a bootable CD made by Acronis for Windows Workstation (or whatever it is called), boot from that and copy the whole HD with that SME-Installation to an external HD, that is connected by usb.

I have no experience with installing such a tool on SME-Server (and no money to buy a server version either).
Alexander Ziemann, Berlin - DE

Offline edb

  • *
  • 548
  • +0/-0
Restoring Data Question- SME 6.0.1
« Reply #7 on: November 04, 2005, 04:17:22 AM »
Thanks again for the reply Alexander.

Unless someone knows how or where I can obtain the sources files for the 2.4.20-18.7 kernel for SME 6.0.1, then I guess I will just have to do the same and use the Acronis rescue CD to do the disk image.

Thanks for getting me on the right track.
What I will do is clone the disk now so that if an unrecoverable failure occurs I can just put in the cloned drive and restore my files from my BackupPC server back onto the running SME cloned drive and I'll be back in business within about 30 minutes. I hope!!

I'll take Ray's advise and test the theory first.

Thanks for the dialogue  ;-)

Ed
......

Offline wjhobbs

  • *****
  • 171
  • +0/-0
    • http://www.chryxus.ca
Restoring Data Question- SME 6.0.1
« Reply #8 on: December 06, 2005, 07:38:41 PM »
Alexander,

When you do a restore from your acronis disk image, how do you deal with the software RAID question? I can see a single drive being no problem. But a disk image of a RAID drive would surely offer some challenges.

Would you first install SME to get the RAID setup and then restore? Or would you restore to a single drive and then go through a process of adding the second drive and having it sync afterward? Or does it have some magic to deal with the RAID array all in one pass?

Thanks for your insight.

John
...

AndyCocker

Restoring Data Question- SME 6.0.1
« Reply #9 on: December 06, 2005, 09:48:41 PM »
Hi,

FYI, it's not neccessary to purchase any software to clone your SME HD. I use G4U (http://www.feyrer.de/g4u/)
to do the job. It will work as long as you have an FTP server running on your network. A copy of Windows XP (Pro?) can perform this task out of the box of course.

As G4U clones the entire disc regardless of whether data is present or not, it is usually neccessary to run the following command first:

dd if=/dev/zero of=/0bits bs=20971520   # bs=20m
rm /0bits)

This fills the drive with zero bits, which are then deleted. G4U can compress the zero bit portions of the drive extremely well.

The above process does take quite some time, but it works and is free. I have successfully restored a backup this way with no problems at all.

Andy

Offline raem

  • *
  • 3,972
  • +4/-0
Restoring Data Question- SME 6.0.1
« Reply #10 on: December 07, 2005, 12:37:42 AM »
The "tools" to backup a whole hard disk to a spare hard disk are already at the linux command prompt. You can use dd, search the forums on "dd" for how to do this eg
http://forums.contribs.org/index.php?topic=26609.0

Alternatively if you have a software RAID1 setup, then you can swap out a hard disk (have it in a removeable caddie) and use that as a backup of your whole installed & configured system.
Obviously you wouldn't want to do this every day, so the usual daily backup is still required.

You remove an existing "good" drive and replace it with a "empty" drive and issue the various commands to rebuild the array. 2-3 hours or so later your RAID1 array is fully synchronised. I have some batch file commands setup for expediency and it takes me about 5 minutes to swap the disks and have the server back online.

The removed disk is retained offsite as a fully configured system backup.
In the event of a major problem you can be up and running in a matter of minutes using the spare RAID disk in a degraded array mode (1 disk only).

Either immediately or at a more leisurely pace, you can then restore "data only & mysql db's" from the latest daily backup to bring the drive "up to date" and you can add a second drive and rebuild the array to get full RAID1 functionality back.
You can also look at doing a total rebuild and clean restore or whatever else may be necessary.

Darrell May (dmay contrib area) has a raidmonitor HOWTO for sme 6.x and the partner HOWTO for rebuilding a failed RAID array (RAID Recovery HOWTO), ie how to add a new (blank) disk to a degraded RAID array.

I use this second HOWTO as the basis for swapping the "offsite" drive into the RAID array. Note you need to zero out the drive using dd

dd if=/dev/zero of=/dev/hdc
(replace hdc with your drive eg hda, hdb, hdd)
or delete all partitions (eg with Delpart) before replacing it into the live array.
...

Offline azche24

  • *
  • 163
  • +0/-0
    • http://az-law.de
Restoring Data Question- SME 6.0.1
« Reply #11 on: December 07, 2005, 06:32:58 AM »
Hi,
Quote from: "wjhobbs"
When you do a restore from your acronis disk image, how do you deal with the software RAID question?


I do not use software-raid in SME any longer, because i had serious problems in doing image-backups together with sw-raid (mondo did not work e.g.) - disks are so reliable and cheap these days. I just change my HDs from server to ws to junk about every 2 years and rely on image backups.

I can only report, that in windoze (xp and w2k) hw-raid is recognized by acronis. You dont even realize, there are 3*raid 5 disks cloned and written to image.

I personally do not like g4u (slow, extra dhcp-server needed or complicated network setup, extra ftp-server needed, huge backups, time-consuming preparation for zeroing disk) and i do not like messing around with extra-disks, like ray recommends.

In a production environment, the backup to image and downtime should not exceed 15 minutes for a 80 GB disk and there should be no manual configuration needed. I personally have no time to get to my server at night or in the weekend, just to do a big action with g4u (like i did before).

And appx. 50 EUR/US-$ for a licence of Acronis to my eyes are well invested.
Alexander Ziemann, Berlin - DE