Contribute
Register

<< Solved >> Backup using dd?

Status
Not open for further replies.
Joined
Nov 17, 2020
Messages
74
Motherboard
Gigabyte Z490I Aorus Ultra
CPU
i9-10900K
Graphics
RX 5500 XT
Mac
  1. iMac
  2. MacBook Pro
Mobile Phone
  1. iOS
I was wondering if it's possible to create a backup of my system (for upgrade purposes, etc) using the "dd" command line program in Linux. I've seen a million articles about using CCCloner and other stuff, but it really seems like I should be able to use dd to make an image of the drive that I could then use dd to restore the drive with. For example:

Backup the drive:
Bash:
dd if=/dev/nvme0p1 of=/media/External/11.1.iso

Restore the drive:
Bash:
dd if=/media/External/11.1.iso of=/dev/nvme0p1

I've done similar things to copy drive contents and had no problems (other than needing to possibly resize the target disk after everything has been copied), but never used it in this manner. I can't think of a reason why it wouldn't work - I'd get all the partitions and everything - but I also can't find any articles talking about backing up this way. Assuming I boot into a live Linux install on a thumb drive, I don't know why I couldn't do this, but I'd love some feedback from the community. I don't want to go assuming this will work and end up borking my whole system because it absolutely does not work. Thanks!!!
 
It totally works, I do this about once a month, I boot from a Fedora live USB.
Your command line would probably want to look more like:

dd if=/dev/nvme0p1 of=/media/External/11.1.iso bs=1M status=progress

...then you'll get an update of how it's progressing, and block size of 1Mb should be quicker.
 
It totally works, I do this about once a month, I boot from a Fedora live USB.
Your command line would probably want to look more like:

dd if=/dev/nvme0p1 of=/media/External/11.1.iso bs=1M status=progress

...then you'll get an update of how it's progressing, and block size of 1Mb should be quicker.
You rock. Thank you so much!!!
 
You can even use the MacOS USB installer you already have! When you reach the install screen, use Terminal. But with Mac's terminal, "status=progress" doesn't work. To see status CTRL+T

[Ive edited this to show instructions. You'll need to turnoff sleep]

Use the **MacOS Installer USB**

** at Setup, load Terminal
** verify current state of sleep

pmset -g

** Disable sleep

pmset -a sleep 0; pmset -a hibernatemode 0; pmset -a disablesleep 1;

** verify sleep is off

pmset -g

** find disk labels

diskutil list

** Identify the Source Disk
- eg: /dev/disk0

** Now, Insert external destination backup disk

** find disk labels

diskutil list

** Identify the Destination Disk
- eg: /dev/disk27

** Unmount the disks

diskutil unmountDisk /dev/disk0 diskutil unmountDisk /dev/disk27

** run dd command for backup

sudo dd if=/dev/rdisk0 of=/dev/rdisk27 bs=1m conv=noerror,sync
 
Last edited:
Status
Not open for further replies.
Back
Top