"Clone" eMMC to smaller SD card on Rock Pi 4c

Hi, cloning an eMMC or SD card to a smaller SD card is not possible. Hence, I tried to use rockpi-backup.sh to back up mmcblk2 on a Rock Pi 4c with a minimal bullseye version (https://sd-card-images.johang.se/boards/rock_pi_4c.html).
apt install resize-helper did not work, because the package was not found, so I installed it manually.

./rockpi-backup.sh -o /mnt/sda1/backups/

seems to have only created an image of /dev/mmcblk2p2 instead of the whole eMMC card.

Running
./rockpi-backup.sh -t expand
warned me that it found only an MBR, but continued anyway to overwrite a GPT on /dev/mmcblk2.
Rebooting was not possible anymore after that action.

Should rockpi-backup.sh work properly on a Rock Pi 4c (with bullseye)?
Is there anything that needs to be changed in the script (or e.g. resize-helper)?

Is there a straight forward way to copy the whole content (all partitions) of the eMMC card to a smaller eMMC or SD card?

What You plan to achieve? backup or spare boot device? For first I would just dd device with xz and for second You need to resize partition as well as changing some uuids.

I would want to have a ‘clone’ of the eMMC card just a that it fits on the smaller card as a complete copy. The target card should work as a bootable disk with all the content of the origin. Obviously this only works if there is not more data on the origin than on the target device.
Resizing and changing uuids should work with the ./rockpi-backup.sh script, if I understood it correctly.

Could you give me an example of the commands, say, for a 64 GB eMMC card with 5 GB of data to a 16 GB SD card.

1 Like