Friday, 17 February 2017

Quickly creating a (block) full backup of a USB mass storage device with dd

Are you ever running around and looking for a spare USB drive? Ever wanted to quickly use a USB drive with data / partitions already on and only need it for a few hours - try creating a quick block copy of the device with dd:

dd if=/dev/sdd of=usb_backup.img; sync

Ensuring we use the 'sync' command to ensure that any buffers are flushed out to disk.

and to restore the image back onto the USB drive after use:

dd if=usb_backup.img of=/dev/sdd; sync

0 comments:

Post a comment