LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   RAID 1 or RSYNC BACKUP (http://www.linuxquestions.org/questions/linux-general-1/raid-1-or-rsync-backup-347897/)

otagojo 07-29-2005 12:04 AM

RAID 1 or RSYNC BACKUP
 
I have a server with two identical 160G SATA disks, one of which has the OS and other installed programs on it, the other is currently blank. I wish to backup the entire first disk so that should it fail I can replace it with the second disk.

I had intended on setting the two disks as a RAID 1 device but someone suggested to me that instead I use rsync to send weekly snapshots to the second disk. They said that with an rysnc update I would also get protection should I screw up any system files (and realise it before the update) when doing any system admin work.

Data only changes on the first disk every couple of months, when I update packages etc.


Which approach is going to be most effective?

Is rsync the best package to use? How easy is it to boot up off the second disk should the first disk fail?


Kind regards

Jo

michaelsanford 07-29-2005 12:39 AM

Data only changes every couple of months ? Do you not use your computer for anything except installing programs onto (and then not use them) ? ;)

Here's the deal. I would say, personally, go with RAID 1. That will provide you with instant failover protection, instead of rebooting, repairing, etc.

Then you have to ask : what happens if your backup drive itself fails ? RAID 1 protects against either drive failing, practically at any time. So, all-around, RAID will give you better backup protection.

However, if you don't have a RAID controller and need to go software, and don't have an HD controller that's capable of multiple concurrent write operations, you will slow down performance somewhat since it will have to write each bit to one disk, then the other one, rather than to both at once. Don't ask me how you figure out if your can, I don't know other than consulting your motherboard/HD controller documentation.

Also, please note that almost /all/ so-called "BIOS hardware RAID" is NOT hardware RAID but software RAID provided by the BIOS. What's the difference you ask ? It's really a matter of encapuslation (done any OOP programming?). For true hardware RAID to work you don't need any special software because the RAID controller card does it all for you, making your array appear to the OS as a single device. Software RAID, on the other hand, relies on drivers at the OS level, 90% of which exist only for Windows XP, wouldn't you know it.

My 0,02 $ : on my servers I use RAID (software in the OS or hardware based on my speed needs), er and then `scp` my thesis documents to a remote server :P

MensaWater 07-29-2005 07:14 AM

I concur. Using mirroring is better because it keeps everything up to date. On my Unix systems I've always mirrored the boot drives and have never had an occasion where the mirror failed with the same corruption as the primary. Not saying it couldn't happen but its rare. One should still do backup to offline media to allow for restore in the event of complete failure of the server.

Also if you went the rsync route you'd need to make sure that you'd made the disk bootable first. Just copying all the files doesn't do this.

rsync is a great tool for duplicating environments (especially code refreshes/updates).

trickykid 07-29-2005 10:12 AM

Okay, here's one rule everyone should consider:

Never depend on RAID for backups, this is not a valid way to prevent or protect actual data. The main reason for RAID would be to protect your system from hardware failure.

But in your case, since your data only changes so little per month, what I'd suggest is using RAID for hardware failure and set your self up with an rsync backup offsite of your changes. It would require little on your part and you'd first be protected with hardware failure and if that's not the case, if something is deleted or changed, you can revert to your backups.

michaelsanford 07-29-2005 10:35 AM

trickykid has a very good point, RAID won't protect you against accidentally typing sudo rm -ry /, it's mainly for hardware failure.

I alluded to that, though, in my post. You should always have an offsite backup of important files, and that can be as simple as a rsync or a burned DVD.

FYI on my desktop machine I have (had :( ) dual 120 GB SATA drives with a single cheap 40 GB IDE drive that was mounted as ... /backup, used specifically for on-site 'off-site' backup of important documents and /etc and SQL databases. Much faster than making a CD and fully automatable.

otagojo 07-31-2005 11:50 PM

Thanks for your advice so far

My system is an 8x1.5 GHz Itanium 2 SGI Altix 350. Data generated is output to a RAID 0, 4x146 GB SCSI RAID device. So, the only information on the SATA disk is the OS and any installed programs i.e. programs are installed and run on SATA disk but their output is written to the RAID device. Given the inherent instability of a striped RAID device, all final output files from the device are backed up off site.

Keeping the system up or at least minimizing the downtime is paramount. The two "threats" to the system are disk failure and the system administrator....me :)

Is it possible to use say RSYNC or XFSDUMP as a sudo RAID 1 device, so that if hardware failure occured on the "system" disk I could get the system running from the "backup" disk easily.

michaelsanford 08-01-2005 12:17 AM

Quote:

Originally posted by otagojo
Is it possible to use say RSYNC or XFSDUMP as a sudo RAID 1 device, so that if hardware failure occured on the "system" disk I could get the system running from the "backup" disk easily.
Not really, unless you had a cron job that rsync-ed every few seconds :P

If you're concerned with minimizing downtime then RAID 1 is the way to go, since you will have virtually zero downtime unless both (all) disks fail simultaneously.

otagojo 08-01-2005 12:34 AM

Re: Using RSYNC. I'm not too concerned about real time backup, but rather being able to restore to a version of my OS etc that hasn't been killed by a sloppy sys admininstrator. I guess I would intend to refresh the backup every two weeks


All times are GMT -5. The time now is 02:17 PM.