How to backup a Raspberry Pi SD card on a Mac

One thing that is quite appealing about the Raspberry Pi is that the entire state of the system is on one tiny SD card. Clone the card and you clone the system. Copy the card and you have backed up the system. Re-flash the card with an old image and you have returned the system to a known good state. There are lots of possibilities here.

Being able to write an image to a card is pretty much an essential in the Raspberry Pi world (unless you resort to only buying pre-written NOOBS SD cards). Luckily writing an image to a card is really easy with the elegant, free Etcher.

Creating an image from a card seems slightly more challenging. A bit of Duck Duck Going (or Googling if you are into that sort of thing) will lead to a number of sites explaining how to do this from the command line with dd. I found only one site suggesting using Disk Utility and suggesting a process that would allow me to use Etcher with the resulting file. Sadly following the instructions didn’t work for me.

After a fair bit of fiddling around I managed to get this working for me. It is a simple process, but there are two little wrinkles to be aware of:

1.    Make an image of the entire “drive” not just the partition.
2.    Format the image as “DVD/CD Master” and then rename the .cdr file to .iso for use with Etcher.

So here is how to do it in a little more detail:

1.    Insert the SD card into the card reader.

2.   Open Disk Utility and locate your card reader. Using the internal reader in my Mac and a freshly minted Raspbian card this is what I see:


3.    Select the drive (not the boot partition) and select File | New Image | Image from “Untitled”.

4.    In the Save As dialog set the format to “DVD/CD Master”. This will create a .cdr file.

5.    Save the new image. This could take a while (~20 mins on my machine for a 16Gb disk). If this only takes a minute or less you have probably selected the boot partition and not the whole card.

6.    Rename the .cdr to .iso and it is ready for use with Etcher.

To be frank, I am not convinced that this is the optimal way to do this. It is a slow process as you spend a lot of time carefully copying blank space. I will experiment some more, but in the meantime this process works for me.

Happy copying and flashing!