Backup with dd?

Lowell Gilbert freebsd-questions-local at be-well.ilk.org
Mon Jan 3 11:58:59 PST 2005


Eric F Crist <ecrist at secure-computing.net> writes:

> I've decided to try doing a complete system backup, attempting a
> bit-for-bit copy.  A friend told me to try the following:
> 
> # dd if=/dev/ad4 of=/dev/ad6
> 
> Both drives are identical SATA150.  Is this the best way? 

Not particularly.  The primary advantage of using dd for backups is
that unlike other methods, it makes a faithful copy of the unused
bits on the disk.  Personally, I've never found this useful, but if
you need it, you need it.

>                                                            I'm hope to
> be able to do a daily/weekly backup this way, and if my primary drive
> fails, switch the cables and just reboot.

dump/restore would be the obvious way to do that.

Note, however, that it doesn't help much if your machine is hacked
(because you likely won't notice right away, and the "backup" will
contain subverted executables and/or devices just like the running
disk).  Nor will it protect you from accidental deletion of important
files or loss of the computer in a fire.  You'll still need
traditional backups for that.

Pretty much the only thing from which the "dd" method protects you is
downtime due to losing a disk, and RAID is more likely to do that
successfully than copying the disk bit-by-bit.


More information about the freebsd-questions mailing list