Cloning/Migrating SSD/HDD on MacOS

Recently, I bought a new 2TB SSD for the Umbrel and wanted to clone all the data from the old SSD, mostly to avoid a new sync of the entire Bitcoin blockchain.

I couldn’t find any easy-to-follow tutorials, so this is what I did to migrate all the data to the new SSD using the macOS operating system for this task.

  1. Made sure I have backups for all wallets
  2. ssh umbrel@umbrel.local
  3. sudo shutdown -h now
  4. Turned off Raspberry Pi
  5. Connected both the old and new SSD disks to my macOS machine.
  6. Found names of both disks with the diskutil list command (example: /dev/disk4)
  7. Ran the disk duplication command: sudo dd if=source of=destination bs=64k
  8. In another terminal window, ran caffeinate -im to prevent the machine from going into sleep mode
  9. After ~12 hours, cloning was completed.
  10. Attached new SSD to the Raspberry Pi
  11. Done!

Note: Replace source and destination in the dd command with the actual device paths of your old and new SSDs, respectively.

If your new SSD is larger in size, also do this:

  1. ssh umbrel@umbrel.local
  2. sudo apt install cloud-init -y to get the growpart module
  3. df -h to find your drive (mine was /dev/sda1)
  4. sudo growpart /dev/sda 1
  5. sudo resize2fs /dev/sda1
  6. sudo reboot
2 Likes

This is great, the only thing i’d like to add here is the dd command could use status=progress