Subject: Re: How to back up from one hard disk to another... ?
To: Robert Kennedy <robert@cs.stanford.edu>
From: Jeff Rizzo <riz@boogers.sf.ca.us>
List: netbsd-help
Date: 11/25/2001 17:36:31
On Sun, Nov 25, 2001 at 05:19:39PM -0800, Robert Kennedy wrote:
>
> The idea is this: I have two disk drives that are identical except for
> the data stored on them. One of them is my main drive, and the other
> is my backup drive. Periodically I would like to back up the main
> drive to the backup drive.
>
There are basically two approaches that come to mind offhand, either
of which are good, depending on exactly what you're trying to accomplish.
1) You can mirror the two drives using raidframe, which I have
working quite nicely on a couple of systems. This has the advantage that
if one of the drives dies, you can continue to work off the other
until you've replaced the mirror drive. See the raid(4) manpage, the
NetBSD website, and the mailing list archives for more information. Basically,
you want to create a RAID1 set of the two drives; as writes happen, they
happen to both disks simultaneously. Reads are done from either drive
(I believe in a round-robin fashion).
2) You can use rsync (from the pkgsrc collection) to periodically back
up the files from one drive to the other. You'll want to partition your
spare drive the same as the primary one, then use rsync to copy the files
from disk to disk. rsync is "smart"; it will only copy files which
have changed.
Hope this helps.
+j