Backup SD card online to external USB card

Piclone (gui) only backups the actual data - https://github.com/raspberrypi-ui/piclone

 

To run from command line

Copy this script https://github.com/raspberrypi-ui/piclone/blob/master/src/backup

On raspberry pi, run

sudo nano sdclone.sh

paste in the text

cntrl-x then y to save and exit

sudo chmod 777 sdclone.sh

 

I'm using a Sandisk external SD card and USB micro SD card reader

16gb Sandisk class 10 Micro SD card - https://amzn.to/350eGpw

Kingston Micro SD card reader USB - https://amzn.to/2Ver1BX

 

Run lsblk

NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda           8:0    1 14.9G  0 disk
├─sda1        8:1    1 43.2M  0 part
└─sda2        8:2    1 14.8G  0 part
mmcblk0     179:0    0  7.5G  0 disk
├─mmcblk0p1 179:1    0 43.2M  0 part /boot
└─mmcblk0p2 179:2    0  7.4G  0 part /

 

 

To run

 

sudo ./sdclone.sh /dev/sda /dev/macblk0