OK, I did it, it’s just the Win32DiskImager interface is a bit weird. Long story short, follow this guide:
https://www.howtogeek.com/341944/how-to-clone-your-raspberry-pi-sd-card-for-foolproof-backup/
My bad for not RTFM first …
Using this method you can use either Win32DiskImager or BalenaEtcher to restore the backed-up clone to another SD card. I used Balena Etcher and it works booting up from the xu4. In drive manager the reported usage of the cloned 32GB card is 2.1G and 32M, this is the same as the original card.
Weird thing is, when Balena Etcher flashed it, it took much much longer than usual flashing a DietPi image and reported flashing the whole 32GB.
So then, maybe, the problem is, however, as you said, the cloned image created using Win32DiskImager at least when flashing takes up the full 32GB of the SD-card. This is obviously no good in case for example the LMS database on the card needs to expand in size. But after booting with the cloned card it reports identical disk usage values to the original card so I guess everything is fine ? But what is the mechanism there ?
I need an IDENTICAL clone of the original SD card so I can just swap them and be up and running again in seconds in case anything goes wrong.
How/why do I use 7-Zip to reduce the size of the img ? Can I use 7-Zip to compress the img so then, finally, I would have an exact clone of the original SD-card ? In 7-Zip for Windows all I can see that it let’s me do is create a .zip out of the image, inserting this into the xu4 would do nothing, because it won’t boot from a .zip file, correct ? So I would have to extract the zip first, it would then extract the cloned .img to it’s full 32GB size again, and I would be right back where I started again ?
Or do you mean use 7-Zip on the xu4 to compress the now 32gb sd card system somehow ?
I used “check and repair” in DIetPi on both partitions on cloned card and there were no errors as far as I could see. And LMS works as on the original card.
But basically, BalenaEtcher took much longer when flashing the Win32DiskImager created cloned backup .img file, reported it as 32GB (full size of card), but drive manager in dietpi reports disk usage values reported above, ie. same as original card, and plenty of free space. So appears to have worked, but still weird the BalenaEtcher behaviour.
Comments/insights appreciated Cloning an SD card so you can have a backup and be up and running again in minutes in seconds instead of having to reconfigure and reinstall and whole new DietPi image should be a built in function in DietPi I think, it is so useful especially if you for example have an xu4 in someone else’s house that corrupts, all you need to do is ask them to power it off, insert the other card and you’re up and running again - even a parent could do it There are Linux commands for this AFAIK.
Thank you very much!