On Wed, 25 Mar 2020, Gene Heskett wrote:

On Wednesday 25 March 2020 04:18:20 Andrei POPESCU wrote:

On Ma, 24 mar 20, 19:12:46, Gene Heskett wrote:
And nothing so far, and I have been watching, in the way of reducing
a filesystem to only the actual size occupied. Then it can be backed
up with dd and recovered, rewritten by dd, at a reasonable size for
storage.  And re-expanded to fit the media it finds.

You could do this with the 'sparse' option of dd (you might need to
fill the partition with a file containing only zeroes first).

The resulting file must be handled with care as many tools (cp, rsync)
will un-sparse it by default, as will writing it to a filesystem
without support for sparse files (tar it first).

To see the actual size with ls you will have to use -s/--size.

All of my attempts to do that with dd alone have been thwarted by
the fact that I have yet to find two u-sd's marked as such and such
a capacity, that actually were the same size.

Just create the partitions slightly smaller than the size of the SD

I've also considered that, but then you risk losing the gpt tables and it
all disappears in the cloud of blue smoke being emmited from ones ears.

BTDT at least twice on arm systems. The distro folks have it and use it
to make an install image of 5 gigs, unpacks to 7 or 8G and which can
then be auto expanded on the first reboot to fill the card, so they know
how to do it, why can't the user make backups from a deployed well
running system that could be put on a fresh u-sd card and treated
exactly the same for recovery purposes?

could you not just dd to a file and then manipulate that file to suit you
but i would never dd a running system

Reply via email to