howtos for various backup systems…
Only works, if SD Cards have the exact same size!! otherwise rootfs partition will be br0000ken. Use rsync in that case
Replace sdX with your SDcard (check fdisk -l)
dd bs=4M if=/dev/sdX | gzip -c9 > /home/your_username/image`date +%d%m%y`.gz
2. terminal:
watch progress
Restore:
gzip -dc /home/your_username/image....gz | dd bs=4M of=/dev/sdX
create partitions.
mount partitions of both SDcards (here raspi rootfs):
mount /dev/sdx2 /mnt/source mount /dev/sdx2 /mnt/target
rsync:
rsync -av /mnt/source/ /mnt/target/
#fixme make sdx1 bootable
adjust bootfs cmdline.txt to match PARTUUID of
blkid /dev/sdX1
if partition sdX2 does not have PARTUUID use UUID in cmdline.txt