MacsandaPi
Posts: 103
Joined: Tue Dec 30, 2014 7:44 pm

How To Clone MicroSD Card Using Mac OS X

Wed Mar 04, 2015 10:42 pm

I want to back up my RPi MicroSD card to my MacBook. This tutorial (http://ananddrs.com/2014/03/30/clone-or ... h-mac-os-x) says to make sure to identify the device name for the whole SD card and not just a partition of it. However, when I use the command df -h in the Mac Terminal, it shows two partitions on the RPi card: RECOVERY and BOOT, but does not show information for the entire single device. Therefore, how am I to proceed with making a clone that will include everything currently on the RPi card?

richrarobi
Posts: 271
Joined: Sun Feb 08, 2015 1:13 pm

Re: How To Clone MicroSD Card Using Mac OS X

Fri Mar 13, 2015 3:38 pm

on my pi 2, mmcblk0 seems to be the device. ls /dev and df -kh show this name.
Also a webpage
http://www.makeuseof.com/tag/easily-clo ... computing/
showed in one of the comments some dd commands for linux that would also apply to the Mac.
I was concerned when I tried it direct on my pi that it was recursive and was trying to copy the outputfile into itself . . .I hadn't plugged in a second card.
I tried this from a laptop linux system:
ssh -l pi pi-00.local "sudo dd if=/dev/mmcblk0" >> myfile.bin
It works (!), it creates the file across the LAN (using wifi, to my lappy Ubuntu MINT Linux) BUT it seems to be copying the WHOLE 16gbyte system...It is still going after it should have finished (I stopped it at 3Gbyte). Can anyone advise if there is a way of compressing the system to an installable minimum at the same time?

p.s. the mmcblk0 refers to the whole sd card (disk), mmcblk0p1 refers to partition 1, etc
p.p.s I did it again, let it run. It took an hour and 15 minutes.( 15gbyte) - all I can do with it seems to be to write it to another sd card!?!? BUT, This is easier for backup.....again on linux mint, mac should be able to do similar?
Screen pi-00 via linux.png
Screen pi-00 via linux.png (59.83 KiB) Viewed 1487 times

Return to “Beginners”