1

I have a MacBook with Linux installed on the primary hard drive. On an external USB 3.0 drive, I have OS X installed.

The external drive has plenty of space so I would like to boot up OS X and make regular copies of the primary drive using dd.

Performing the backup the other way would be simply done using something like: dd if=/dev/sda of=/backups/backup.dmp, however, OS X is a little alien to me, so I'm not sure how to reference the primary drive from OS X.

  1. What would be the dd command line for making a backup?
  2. What would be the dd command line for restoring the backup?
Chris Snow
  • 4,046
  • 4
  • 23
  • 30
  • note that [you don't actually need `dd` for this](https://unix.stackexchange.com/questions/12532/dd-vs-cat-is-dd-still-relevant-these-days). – strugee Jul 01 '15 at 19:08

1 Answers1

1
diskutil list

will show you the Drives.

A Partition is /dev/diskXsY.

So

dd if=/dev/diskXsY of=/BACKUPIMAGE.img

with the appropriate X and Y should do it for you.

Jodka Lemon
  • 3,143
  • 13
  • 42