[oclug] dd
Stephen Gregory
oclug at kernelpanic.ca
Mon May 14 10:29:22 EDT 2012
On Sat, May 12, 2012 at 8:34 PM, Allan <amau at sympatico.ca> wrote:
> dd if=/dev/sda1 of=/dev/sda5 or
>
> dd if=/dev/sda1 of=/dev/sdc9.
>
> Can someone give me some guidance on this? Thanks in advance.
It is easier and faster to use cp -a.
The backup is more flexible as it can be written to any device as long
as there is enough free space. Using dd both source and destination
have to be the same. Specifically if my 500GB drive files, I can be
back up and running on a 120GB drive I happen to have sitting around.
Using cp will show file system errors. DD will happily copy corrupt
data and not tell you.
CP can be used on a live system. DD can only be used on unmounted or
read only file systems.
That said if you are going to use cp you should use the excellent
rsnapshot instead. Rsnapshot uses rsync and hard links to make full
backups. I use rsnapshot to make hourly snapshots during working
hours, as well as daily, weekly, monthly snapshots.
The only benefit dd gives is a copy of the boot block. Filesystems,
and partitions are trivial to recreate. And cp insures you have a
backup of you data.
--
sg
More information about the OCLUG
mailing list