Banana Pi R64 backup and restore

Hi,

I backed up my system using

today=$(date +"%d-%m-%Y")
dd if=/dev/mmcblk1p66 bs=20M| gzip -c > /mnt/sda1/backup_$today.img.gz

which, output the zipped image. However when trying to recover it using BalenaEtcher I was informed that the partition table was missing and the image does not appear to contain one and that the device might not boot if I continue.

I also found this code to restore the image but I doubt it will work since the partition is missing.

#gunzip -c /mnt/yourddimage.img.gz | dd of=/dev/sdX

Is there a way to automatically backup/restore everything on the sd card rather than having to manually preform the backup?

Thanks,

Aaron

seems you only backed up one partition, not the whole disk/card.

So I should replace it will mmcblk0?

your dd command would indicate mmcblk1