[lug] Backup to 2nd HD with dd & rsync?

Michael D. Hirsch mhirsch at nubridges.com
Fri Jan 24 08:46:51 MST 2003


On Thursday 23 January 2003 08:46 pm, Thomas R. Detman wrote:
> I have two hard disks spinning in my workstation.
> I would like to use one as a backup for the other,
> --> if it isn't too too complicated.
> One is a SCSI and the other is IDE.  (A result of history, not plan.)
> The SCSI is the one I use, it is 17 GB, ext3, with 4 partitions.
> The IDE could be wiped. It is 12 GB, ext2, with 2 partitions.
> Every thing stored on the SCSI only takes up only 10.5 GB.
>
> Me thinks I'de start by using dd to copy the "stuff" on the SCSI
> onto the IDE, wiping out previous IDE contents in the process.
> (Doing such "stuff" is outside my envelope of knowledge and comfort.)

Nah, you don't want to do this.  dd will do a bit for bit copy of one 
partition to another, but the two partition must be the same exact size.  
You could even use it to dup an entire drive, I think, if the two drives 
are identical. 

You want rsync, at least initially.  rsync (or cp -a, for that matter) will 
only copy the files, dd copies the blank parts, too.  So rsync will be 
faster.

Hount both disks and then 
    rsync -a /path/to/dir/ /other/path/to/backupdir/
will copy all the files in dir to backupdir.  If you leave off the final 
'/' on dir, it will copy the directory dir to backupdir.

--Michael

> Next I'de set up a cron job to keep the IDE drive up to date as
> a "mirror" of the SCSI drive using rsync.  The rsync web page:
> http://rsync.samba.org/ seems to suggest this is just the kind of
> thing rsync was made for.
>
> I think I might be able to muddle thru the rsync part, but even
> after reading the man and info pages on dd, it still seems like
> black magic to me.
>
> Tom
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug




More information about the LUG mailing list