dd to smaller media?

I have reviewed much documentation, but I still can't figure out. I have a disk image file that was created with dd(1). The original disk size was 16GB, but only about 2 GB were actually used. Is there a way for me to write this image to an 8GB drive? Thanks in advance!
 
dave said:
I have reviewed much documentation, but I still can't figure out. I have a disk image file that was created with dd(1). The original disk size was 16GB, but only about 2 GB were actually used. Is there a way for me to write this image to an 8GB drive?

Not directly, no. This is one reason dd(1) is a poor backup method.

You can use mdconfig(8) to mount the image file, then dump(8) the filesystems. Dump files can be restored to different-sized filesystems.

My article on different backup methods: http://www.wonkity.com/~wblock/docs/html/backup.html
 
Back
Top