mirror whole hard disk with rsync

Clint Byrum cbyrum at spamaps.org
Thu Feb 19 17:04:34 GMT 2004


On Thu, 2004-02-19 at 07:48, Marc Perkel wrote:
> Dick - that doesn't answer the man's question.
> 

Its a valid question though (asking why not use RAID1 I mean). If we
knew that, we could better serve his rsync question. Or he might not
have realized that for things like this, RAID1 might be better. It just
depends on his goals.

For instance, if you're using removable IDE disks and rotating them
periodically... RAID1 will not be good, because you'll have to re-sync
the whole RAID1 every time.

Then again, in situations like those.. something like drbd(distributed
redundant block device) comes to mind. Google for drbd... network RAID1
done right basically.

> mount the other drive say as "/backup"
> 
> rsync -ax --delete --force / /backup/
> 

Almost.. you made the same mistake I made a few months ago when doing
this.

rsync -ax --delete --force --exclude /backup / /backup/

Otherwise.. every time you do this, you end up copying your backup to
/backup twice. ;)

> I think that will do it.
> 
> You might want to run a list of rsync commands on a list of directories 
> if you are coppying a lot of files. I do the same thing where I back up 
> critical files with one script hourly - other user files nughtly - and 
> the system stuff manually after installing new software. I like doing it 
> this way rather than raid 1 becaue if I screw up I can use rsync to undo it.
> 

Right, thats why RAID1 is for redundancy, and rsync is for backups. ;)




More information about the rsync mailing list