linux-cli

dd if=/dev/mmcblk0 of=$HOME/backup.img
 
dd if=/dev/mmcblk0 bs=64K conv=noerror,sync status=progress | gzip -c > /mnt/tbcrypt/lego.img.gz
  • bs=BYTES
    • read and write up to BYTES bytes at a time (default: 512); overrides ibs and obs
  • conv=CONVS
    • convert the file as per the comma separated symbol list
  • fdatasync
    • physically write output file data before finishing
  • fsync
    • likewise, but also write metadata
  • Source: Full Metal Backup Using the dd Command - Linux.com