Step 1: put in one new hard disk and check system

fdisk -l

Setp 2: clone hard disk command

dd if=/dev/sda/ of=/dev/sdb

Step 3: Set crontab every 3 day auto clone hard disk for backup

crontab -e
0 5 */3 * * dd if=/dev/sda of=/dev/sdb

Step 4: change to new hard disk if got this error


fsck /dev/sda2 
this command is check and repair file system

dd examples

Caution: Use dd cautiously — improper usage or entering the wrong values could inadvertently wipe, destroy, or overwrite the data on your hard drive.

Create a ISO disc image from the CD in the computer.

dd if=/dev/sr0 of=/home/hope/exampleCD.iso bs=2048 conv=noerror,sync

Create an img file of the /dev/sda hard drive. To restore that image type: dd if=disk1.img of=/dev/sda

dd if=/dev/sda of=~/disk1.img

Copy the contents from the if= drive /dev/sda to the of= drive /dev/sdb.

dd if=/dev/sda of=/dev/sdb
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *