Backups: rsync, software RAID, other strategies?
Bob Johnson
bob89 at bobj.org
Sat Mar 6 22:52:59 PST 2004
A bunch of related questions:
I'm setting up a small mail and file server. The mail server part will
be Courier, while the file server part will primarily be used via NFS
and Samba to store backups of my desktop and laptop computers.
The system has a pair of WD1600JB 160 GB ATA 100 drives in it, both on a
single Promise PDC20268 UDMA100 controller, but each on a separate
channel (i.e. both are masters with no slaves). My plan is to use one
of the drives as a backup for the other. I want to use a backup method
that creates a mirror of the working drive so that if it fails, I can
simply mount the backup in place of the working drive, and get back in
business. The operating system will (probably) not be on either of
these drives, they will only host /home where mail and backup files
will reside.
I've tentatively decided to synchronize the mirror to the working drive
with rsync run once a night (perhaps more often later). This risks
losing up to a day of mail, but that's probably not the end of the
world. The reasoning I used was that if I use software RAID, an
unexpected power failure during a large write operation (yes, it will
be on a UPS) could corrupt both drives. Running rsync once a night
would reduce the risk of a failure that damaged both drives, since
their write activity would not be so strongly correlated.
Is my fear of losing both drives in a software RAID (mirrored drives)
configuration a reasonable one? Or is that not going to happen?
If I use rsync with -delete to maintain a mirror of the primary drive,
what happens when the primary drive fails? Is there a scenario that
causes rsync to duplicate all the missing data on the primary drive by
deleting it from the mirror drive (I've heard of this happening to
someone, but I believe he was using a homegrown perl script rather than
rsync).
Is Courier compatible with this scheme? Or does it care about inode
numbers or some such thing that will make the backup copy useless?
Is there any chance it would make sense to use the Coda file system for
this?
Do any of the answers change if the mail server ends up on a remote
system, but I still want the maildirs backed up on the file server?
Any other suggestions that don't involve buying new hardware? An IDE
RAID controller would be nice, but buying one isn't on my list of
things to do. But if I DID break down and buy a new controller card,
what should it be?
Thanks,
- Bob
More information about the freebsd-questions
mailing list