LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 08-15-2010, 05:45 PM   #1
PehJota
Member
 
Registered: Aug 2010
Distribution: Desktop and netbook: Debian Squeeze; Router: DD-WRT
Posts: 43

Rep: Reputation: 5
Backup Daemons or mdadm RAID Across Internal and External HDDs?


I'm building a new desktop computer, on which I plan to install Debian Squeeze. I'll have a 1 TB SATA hard drive in the system. I'm also considering using two 500 GB external USB drives, but I'm debating about how I want to use them. Running them all separately for 2 TB of space could be a nightmare, with three potential points of failure, so I was thinking of using the two external drives as a backup system instead.

I'm considering linking the two external drives in a RAID 0 array, then linking that array and the internal drive in a RAID 1 array. I would use mdadm software RAID for all of this so I could use individual partitions in the arrays, avoid hardware dependency, and have greater software control. So now is this feasible to do (having a partial RAID 0+1 setup)? Moreover, what kind of performance could I expect from using potentially slow external drives (one of which I know has a very long spin-up time after idle periods) in a mirroring setup with the internal drive?

Would I be far better off using a filesystem backup daemon instead?

EDIT:
After some more research and brainstorming, I've decided I might just end up using rsync+cron, lsyncd, or DRBD (assuming it can easily make backups locally). I'd probably have to link up the external drives in RAID 0 (or use some filesystem link trickery). But I suppose such a setup would offer greater control, flexibility in disk capacities (the full system isn't so strictly limited to the capacity of the smallest member of the array), and granularity than RAID 0+1 would.

I'm still open to thoughts on the mdadm RAID 0+1 solution, but does anyone have any advice on choosing backup software? For some background on my needs, I'll be using this computer as both an everyday desktop and a personal LAMP server (MySQL database files would be included in the backups).

Any advice would be appreciated!

Last edited by PehJota; 08-16-2010 at 04:14 AM.
 
Old 08-16-2010, 08:30 PM   #2
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Rep: Reputation: 67
RAID is not really for backups. It's for resilience against runtime failures. I would use those two externals as separate disks and have an rsync script to backup to *any* location. Then I would alternate backups to each disk. Or, I would leave one external plugged in to be backed up to regularly with a cron job and use the other to manually back up to on a weekly basis or something like that.

If you are really concerned about your data, you will get a backup point in a separate physical location too.

Including a USB drive in a RAID setup is a bad idea. Your entire computer will be reduced to the speed of that drive.
 
1 members found this post helpful.
Old 08-17-2010, 03:56 AM   #3
PehJota
Member
 
Registered: Aug 2010
Distribution: Desktop and netbook: Debian Squeeze; Router: DD-WRT
Posts: 43

Original Poster
Rep: Reputation: 5
Thanks for the reply. Yeah, I figured RAID with external drives would suffer a huge performance hit, but I wasn't entirely sure.

That's true about RAID and backups; there are cases like plain old user error that RAID won't protect against. My main goal though was to protect my data from a drive failure that SMART may not predict, but the performance of RAID 1 in this case throws that solution out the window. So then the performance and flexibility of backup programs like rsync, lsyncd, and DRBD (though the latter two have the same user error issue as RAID) would be better. Since I actually plan on using more than half of my 1 TB of internal drive space right off the bat, lol, I figure I'll need both 500 GB external drives for a backup. I assume RAID 0 would be the best way to join the two drives even if I use something like rsync?

Regarding rsync, I understand that after the initial backup it traverses the whole filesystem looking for updated files (as opposed to lsyncd and DRBD which use filesystem/device monitoring tools like inotify to hear about updates with greater efficiency). Would this incremental traversal take a long time and/or be a performance issue on a 1-TB filesystem?
 
Old 08-17-2010, 06:19 AM   #4
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Rep: Reputation: 67
I don't think DRBD is what you want either.

The "analysis" phase of rsync is pretty quick no matter what. Then it depends on what has changed since your last backup. The first transfer will take just about as long as it would to copy off all of the files to the external USB drive. After that you need to tweak how rsync behaves on your own. You can do different checks for different parts of the filesystem. (Some size+time, some checksum, etc). You haven't said _what_ you want to back up.
 
Old 08-17-2010, 06:38 AM   #5
PehJota
Member
 
Registered: Aug 2010
Distribution: Desktop and netbook: Debian Squeeze; Router: DD-WRT
Posts: 43

Original Poster
Rep: Reputation: 5
Ah, okay, thanks. So then rsync probably really is my best option I suppose. It's definitely the most versatile.

As I mentioned, the system will be an everyday desktop and a personal LAMP server. So I'd be backing up configuration files (/etc and /home), lots of media files, documents, logs and data in /var, website software/files, MySQL database files, and possibly the operating software+packages+libraries themselves as a matter of convenience. I would guess that size+time checks would be good enough for most files, right? And database files may require checksums?
 
Old 08-17-2010, 05:08 PM   #6
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Rep: Reputation: 67
I've never really heard of lrsyncd, but it might work out for you. You'll probably want to backup some of that more than others. I personally wouldn't feel the need to back up things like /usr and /bin - this isn't Windows! Your system can be recreated easily =). I feel like /home, /etc, /var, and /srv are enough, and possibly ignoring certain parts under that would be reasonable.
 
Old 08-18-2010, 07:44 AM   #7
PehJota
Member
 
Registered: Aug 2010
Distribution: Desktop and netbook: Debian Squeeze; Router: DD-WRT
Posts: 43

Original Poster
Rep: Reputation: 5
Alright, thanks for the help! Once I get my system all set up, I'll try out rsync to see how it performs. Sounds like it should work well for nightly backups on cron.

And I only thought of backing up /usr (and maybe /bin and /sbin) simply as a matter of convenience. With full backups like that and a backup of my master boot record (experience with a mysterious disappearing MBR on my friend's HDD taught me to save these...), I could theoretically run a few commands and walk away to restore my entire system to a new drive, should my current one fail.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why can't I mount this md0 raid? (mdadm and software raid) cruiserparts Linux - Software 35 01-05-2013 03:35 PM
Broken raid 5 (11 drives in mdadm) -- data recovery/raid reconstruction needed -- ple jml48197 Linux - Server 4 07-27-2010 12:57 PM
Dell/Intel ICH7 soft-RAID and mdadm raid-level mistake PhilipTheMouse Linux - General 0 03-14-2009 05:59 PM
RAID mdadm - Sending E-Mails on RAID Failure? rootking Linux - General 1 12-25-2007 03:59 AM
permissions and external hdds DJOtaku Linux - Hardware 1 02-04-2005 05:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration