dd
in your example does full system image backup, byte to byte mirroring /dev/sda
to /dev/sdb
. However you must be sure that /dev/sdb
if equal or larger size disk.
Modern systems do not permit plain copying like that because they embed some other unique identity information like UUIDs into volumes; there maybe issues with LVM setups, on-disk cryptography etc. And backing up from live system is not usually good idea. So it depends.
In general, such type of backups are of course valuable if you want to:
- mirror system without rebuilding it's structure again (and backing up with
tar
for example is a second rebuild of structure on new place)
- save something that classic Unix tools do not save (for example, ext2 file attributes or xattrs, or file creation times (ctime) are important for you)
- or you do not care about size of backup or you really have many same type disks or large quantities of data space available
When dealing with symlinks it's important to know that there can be systems or tools which do not permit changing symlink owner, and if it's important, then do a full system mirror image. Otherwise plain tar
may be more efficient and sufficient.