For some reason there don't seem to be too many questions or answers about using dd for creating "smaller" image files with the conv=sparse option here.
So when using dd for image creation, can I safely use e.g. dd if=/dev/sda of=/media/storage-device/sda.img conv=sparse to get an image file that uses (much) less space on the target?
Don't know if it matters, but in this case the source would be a SSD with EXT4 filesystem and only 15% used (as it is quite new), and the target also would use EXT4 fs.
Or is this possibly a rather bad idea (under certain circumstances) and may lead to problems (later, e.g. when I need to restore it)?
I am also wondering if this would work when the target is a network mount or filesystem?
The goal would be to get an image file of either a partition or (even better) a whole disk that doesn't take much more space than needed, while keeping it easily mount- and usable.
Extra compression isn't really needed or wanted, and it usually also would make the resulting image not mountable any more I guess, so I can live without it.
And I know Clonezilla can do stuff like saving only used sectors, but I don't like its limitations, e.g. Due to the image format limitation, the image can not be explored or mounted. (And of course dd is already available on every system.)
Many thanks in advance