备份教程【linux】.md 964 B


notion-id: 81c64604-6bbd-4ea5-a28d-549a7c4ad2

To create an image from a drive

sudo dd iflag=fullblock if=/dev/sdx of=/path/to/new.iso status=progress

Alternatively, to create a USB drive from an image

sudo dd iflag=fullblock if=/path/to/iso of=/dev/sdx status=progress

In Linux it can be as simple as (pick one):

cat /dev/sdx >/path/to/image
pv  /dev/sdx >/path/to/image
cp  /dev/sdx  /path/to/image

or (not as simple, but quite common example):

dd if=/dev/sdx of=/path/to/image bs=8M

cat   /path/to/image   >/dev/sdy
pv    /path/to/image   >/dev/sdy
cp    /path/to/image    /dev/sdy
dd if=/path/to/image of=/dev/sdy bs=8M

https://superuser.com/questions/1557535/how-to-backup-a-usb-drive-with-2-partitions-kali-linux-live-cd-persistence