# best method of backing up a drive

## LodBot

Well my 5 person ftp server has increased in size, and now I need to ensure that data isn't lost.  My question is: What is the best way to backup data on a drive?  Currently I have a cron job that copies / to /backup, and unfortunatly I don't think this will work.  I was thinking the best thing to do would be to just have a clone drive that copies data every so often?

Thanks in advance.

----------

## CheshireCat

If you're going to do it that way, and your only concern is securing against drive failure, I would suggest RAID mirroring.  This will allow your backup to always be in sync with your filesystem, and if either of the drives fails, it will continue running until you bring the system down to replace the failed drive.

If you want to secure your files against accidental deletion and the like, RAID will not help you.  You might want to just copy the files at regular intervals, or if you want to conserve space, you can archive them.  If you have CPU and/or memory to burn, you can pipe the output from cpio or tar through bzip2 or PPMd, both of which can get fairly good compression ratios.  For decent compression (almost 3x on linux kernel archive) with very low resource usage, you could use lzop as a compressor instead.  Compression can also help to save space if you want to keep multiple backups.

A third (and the most complex) option would be to use a revision control system.  If the only checkins made are automated backups, you wouldn't have to worry about merging, and you would have a history of all versions of a file with (at whatever interval your automated checkins occur).

----------

## bmichaelsen

A forth possibility:

You have enough discspace, but not much CPU power.

use rsync to generate a incremental backup ...

----------

## swingarm

http://www.partimage.org

----------

## LodBot

Thanks for the replies.

From what I have researched, mirroring 2 hard drives would work the best for me.  Can you recommend any good RAID controllers, hard drives (SATA or IDE?), or anything else I'm going to need?  From what I've read, it seems like the best setup would be a 4 channel ide RAID controller (http://www.newegg.com/app/ViewProductDesc.asp?description=16-102-008&depa=1) and 2 200GB Western Digital 8mb cache hard drives.  The 4 channel RAID controller will let me upgrade later if I have to.  Will I need to do anything when I reinstall Gentoo?  As far as I know, the install will treat the RAIDed drives as one right?

Any comments?  Thanks

----------

## LodBot

bumped

----------

## swingarm

The only thing I can suggest is looking at the bottom of the Gentoo Install Instructions where they have some pointers on installing on Hardware ATA Raid.  You can also check these forums and the mailing list archives for RAID topics, that's what I did when I installed Gentoo on to my IDE Hardware Raid(which I'm not using anymore).

----------

## LodBot

Thanks for the suggestions. *swingarm wrote:*   

> (which I'm not using anymore).

 Why aren't you using the raided ata drives anymore?  should I go with ide or sata?

Thanks.

----------

## ctford0

there are some tips in the GWN a couple of weeks back about using tar to do incremental backups.....

maybe you should check that out....

chris

----------

## swingarm

 *LodBot wrote:*   

> Thanks for the suggestions. *swingarm wrote:*   (which I'm not using anymore). Why aren't you using the raided ata drives anymore?  should I go with ide or sata?
> 
> Thanks.

 

From what I remember I did something(I experiment alot) to crash my root filesystem, not the IDE Raid's fault.  Before I reinstalled I decided I didn't want to try IDE Raid again until I could do RAID 0+1, my current Motherboard only does 0 or 1, not 0+1.

----------

## LodBot

I've been researching, and I've decided to upgrade to sata, so my question is what 4 channel RAID controller should I buy that runs with gentoo?  If it matters, I plan to strip 2 drives, and mirror the other 2.

Thanks

----------

