Clone SD Card Image (Mac)
I've started using Raspberry Pie. Backing up the SD Card image and restore is a quick way to test things out.
First check which disk the SD card is using
diskutil list
![](https://3.bp.blogspot.com/-dUM0mLxYB3I/V2F9bRfywtI/AAAAAAAA9XY/iOgqDjlo0gw-RSnJEPZ_4zMYXRuHOhi2ACK4B/s1600/Screen%2BShot%2B2016-06-15%2Bat%2B11.07.20%2BPM.png)
then copy raw format of the card to image file while at the same time compress it to save some space
sudo dd if=/dev/rdisk2 bs=1m | gzip > ~/Desktop/pi.gz
gzip -dc ~/Desktop/pi.gz | sudo dd of=/dev/rdisk2 bs=1m
this could take a while
(to eject disk)
First check which disk the SD card is using
diskutil list
![](https://3.bp.blogspot.com/-dUM0mLxYB3I/V2F9bRfywtI/AAAAAAAA9XY/iOgqDjlo0gw-RSnJEPZ_4zMYXRuHOhi2ACK4B/s1600/Screen%2BShot%2B2016-06-15%2Bat%2B11.07.20%2BPM.png)
then copy raw format of the card to image file while at the same time compress it to save some space
sudo dd if=/dev/rdisk2 bs=1m | gzip > ~/Desktop/pi.gz
To restore image to SD, first unmount the card by
diskutil unmountDisk /dev/disk2
then
this could take a while
(to eject disk)
diskutil eject /dev/disk2