How to clone an image with a smaller footprint?

Is it possible to clone an image with a smaller footprint than 15GB?

I am using this tutorial for reference when cloning:

Cloning produces a bit-for-bit exact copy of the whole partition, so you can’t clone less. Once the clone is done though, you can reduce its size by converting it from a raw image to a sparse image. This URL is about the JTK1, not the JTX1, but it has some useful information on that topic:

I have not tried this yet on a JTX1, but the “bootloader/mksparse” application is available on the JTX1 driver software, and very likely works exactly as it does on a JTK1. Once in “sparse” format you can no longer loopback mount and edit the file, but you can restore a Jetson from that sparse clone.

If you don’t need to restore from the clone by direct flash, then you can just use standard backup methods available to any Linux computer and copy files instead of partitions, e.g., with rsync.

If you have a 15GB file, then you can also alter its size using gparted (you have to cover it with a loopback device and run gparted on that loopback device special file). If you alter the size though, restore via clone will not do what you expect unless re-expand the file to the exact original size before flashing with it.

The “best” procedure depends on your use-case, but no matter what you are still going to end up with a file over a couple of gigabytes.

Thanks, just what I needed.