Apr 172017

If you’d like to backup the SD card in your raspberry pi, for sanity or to try a different OS … it’s super easy.

Using OS X, insert the SD Card as you normally would to load Raspbian and launch the terminal application of your choice.

It’s best to be root when doing this follow these steps:

change to root:
sudo -s

find the SD card (like /dev/disk3 for example):
diskutil list

create the backup image: (adding the r makes it go way faster)
dd if=/dev/rdisk3 of=/path/to/rpi-sdcard-backup.img bs=1m

restore the backup image:
go into diskutil and unmount any partitions on the SD card but don’t eject the disk.
dd if=/path/to/rpi-sdcard-backup.img of=/dev/rdisk3 bs=1m