How to clone the bootable SD card

Now I have a fine running system, used for home automatisation. BPI-M2 Berry I like to have a second sd card with the same configuration like the running card.

all clone attemps are fail yet, because the BPi will not boot, I have used the Windows with AOMEI, under Linux with dd command. Both with creating a image file and write it back to the new card. But the data are allready on the card, but the BPi do not boot…

What can I do?

Between SDs you I use directly dd command. You need to clone all the device (not the partition)

Create image with this command:

sudo dd if=/dev/mmcblk0 of=bpi.img status=progress

And this to write in another SD:

sudo dd if=bpi.img of=/dev/mmcblk0 status=progress

When using dd, be very carefull to unmount the partitions and be very careful not to write the wrong partition.

I will try it next Weekend, many thanks.