Clone sd card (only usable part not all sd card)

Hi, I want to backup my beglebone sd card
Is there any way to clone only the usable part and not an all bit copy
of 8Gbit sd card


If you want to take an image of the card without creating a huge file filled with mostly zeros, compress! The following should accomplish just that with significant space saving if the card’s device happens to be /dev/sdb. (I can’t test this at the moment, so I can’t confirm it works.)

sudo dd if=/dev/sdb | gzip > image.gz