How to clone external drives with mac in emergency
There are many tools out there that claim to are the best solution for rescuing a dying hard disk drive. They are called Disk Warrior, Data Rescue, PhotoRec and you will find numerous other solutions and apps.
The experiences I made with this kind of tools are very poor and uncomfortable. None of the tools I tested has been able to copy my data or clone the whole disk. None of them. And furthermore, the tools have even not been able to copy all the files that were OK still.
So my next try was to find the best way to copy data from the mac terminal with native mac utilies.
But at first, I will tell you something about my test case:
- Micron SSD, Model No. ASMT 2135, internal disk drive
- is used via an external USBC 1000 GB Capacity, 950 GB are used (a lot of data to loose)
- the performance is going down when accessing specific files
- Apple Disk Utility is not able to make an image of this hard disk ("not allowed")
- Accessing some specific files is causing the device to eject / reset the mounting
- Mounting is only possible in read-only mode
- ... (to add more?)
While testing around with cp and found out that multiple cases caused cp to fail a lot of times and broke my cloning workflow many times completely.
Next, I tried rsync.
The bad thing at first:
- the rsync command also broke multiple times (as well as cp)
But the positive things are cleary overweight:
- the device was only unmounted is very rare situations
- you can call the same command multiple times, and the process will be resumed every time
Here is my rsync command I stick with at the moment:
> rsync -arhvPtE --ignore-existing <source> <destination> -a = cummulative for:
-r = copy subfolders recursive
-l = copy symbil links
-p/-t/-g/-o/-D = apply rights 1:1
-h = human readable numbers -v = verbose output / more informations -P = cummulative for:
--progress = show progress of transfer
--partial = resume potential progress of transfer
-t = copy timestamp of files -E = preserve MacOS X file labels/tags --ignore-existing = ignore existing files