Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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
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).
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.
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.
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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.