/etc/daily uses the following code sync echo "" echo "Backing up root filesystem:" echo "copying /dev/r$rootdev to /dev/r$rootbak" dd if=/dev/r$rootdev of=/dev/r$rootbak bs=16b seek=1 skip=1 \ conv=noerror fsck -y /dev/r$rootbak
where as http://www.openbsd.org/faq/faq10.html#DupFS says to use either cd /SRC; dump 0f - . | (cd /DST; restore -rf - ) or cd /SRC; tar cf - . | (cd /DST; tar xpf - ) I figured out that tar does not work for pipes or dev files so it is not any good for copying the root file system. But I don't know why you should pick "dd" over "dump". For example using newfs /dev/$rootbak mount /dev/$rootbak /altroot cd /; dump 0f - . | (cd /altroot; restore -rf - ) umount /altroot is dramatically faster the using "dd". But I assume that there must be some reason for using "dd" for copying "/". The faster the copying takes place the less likely there is any inconsistency. So what am I missing. PS I also don't understand why the first 16*512 bytes are skipped when using "dd"? If I want to copy a whole physical disk, should I also skip the first 16*512 bytes?