Clone SD Card (Mac)

Here’s how to clone an SD card on a Mac. Useful when you want to backup and restore your Raspberry Pi.

Find path to SD card

$ diskutil list

Should be something like /dev/disk1, depending on what other devices you have connected to your system

Make image of SD card

$ sudo dd if=[sd card path] of=[image].dmg


$ sudo dd if=/dev/disk1 of=~/Desktop/backup.dmg

Tip: During dd operations, hit [ctrl] + t to check transfer status

Transfer image to SD card

This will take much longer than making an image, since you are writing to an SD card, so grab a drink!

Caution: Double check input and output disk paths before running copy commands

~ $ diskutil unmountDisk [sd card path]
~ $ sudo dd if=[image file] of=[sd card path]


$ sudo dd if=~/Desktop/backup.dmg of=/dev/disk2

Storing images

Image clones can be huge files, so compressing them will help save HD space!

Compress image

$ gzip [image file]

Uncompress image

$ gzip -d [compressed image file]
comments powered by Disqus