How to safely copy a large volume of data on your Mac

photo of author
Stealth

My scenario involves transferring a large volume of data over Mac between two external hard drives. Specifically, I need to copy over 2TB of (photos, videos, and app libraries Photos) between two external storage media (HDDs) – from LaCie5 to LaCie4. If you are interested in how you can safely copy a large volume of data to your Mac, this tutorial will definitely help you.

What you need to consider before starting a large data transfer

1. Make sure you have enough space on the destination HDD for the new data.

2. Use connection ports and cables that support high transfer speeds. Preferably USB 3.0/3.1 or Thunderbolt).

3. Ideally, the HDDs or SSDs between which data is exchanged should be formatted with APFS. For Mac, APFS or HFS+ are the most optimized.

4. Allow time for this operation. Regardless of the method used, transferring a large amount of data will take a considerable amount of time. For 2TB on a USB 3.0 port (actual speed ~100-150 MB/s), the transfer can take 4-6 hours. On USB 2.0 (~30 MB/s), it can take 18-24 hours.

5. Disable the mode Sleep for the Mac and for hard drives. This way you avoid the transfer being suspended when entering the mode Sleep.

Go to: System Settings > Energy > Prevent automatic sleeping when the display is off (Activated) / Put hard disks to sleep when possible (Disactivated).

macOS ENERGY Settings
macOS ENERGY Settings

That said, below you will see how you can safely copy a large volume of data to your Mac, without worrying about interruptions or data loss.

How to safely copy a large volume of data to Mac between two HDDs

When you have to transfer a large volume of data, as is my case, you don't want to use the classic method by Finder. That is, to do “copy/paste”. This process can get stuck, data corruption may occur during the transfer and then the process will have to be restarted from the beginning. In addition, just “Preparing to copy…” I think would take an enormous amount of time.

The most effective method in such situations is the command rsync executed in the Terminal utility. rsync is a tool built into macOS, ideal for large transfers, as it verifies data integrity and can resume the transfer in case of interruption. Basically, if for any reason the transfer was interrupted, it will resume from the point where it left off (avoiding redundant copying of files already transferred), while also verifying the integrity of files copied before the interruption.

The command to copy/transfer data with rsync is as follows:

rsync -avh --progress /Volumes/Source/ /Volumes/Destination/

What does this command do? rsync:

-a: preserves file permissions and structure.

-v: displays details.

-h: human format for dimensions.

--progress: shows the transfer progress.

If the source and/or destination folder have names with spaces, it is a good idea to use quotation marks (“…”), for clarity and to avoid errors if the shell misinterprets the escaping.

For my scenario, I used the command:

rsync -avh --progress --no-links "/Volumes/LaCie5/laurentiu/Photos (macOS)/2017 (Travel).photoslibrary" "/Volumes/LaCie4/iPhotos/"

Basically, we avoided any misinterpretation of the library created by the application Photos: 2017 (Travel).photoslibrary. Also, in my command line in Terminal, I added --no-links to avoid copying symbolic links as links (libraries Photos may contain internal links, and this copies them as real files).

At the end of the copying process, you will receive a short summary, which looks like this:

sent 99010M bytes  received 244k bytes  39991k bytes/sec
total size is 220G  speedup is 2.22

In my case, the speed was very slow because during the copying I was also running other applications on the HDDs involved in the transfer, which is not recommended.

How to safely copy a large volume of data on your Mac
rsync Terminal

This way you will be able to copy a large volume of data to your Mac without having to worry about the transfer getting stuck. At any time, if something happens and the transfer is interrupted, you can resume the command line and it will continue. Also, keep in mind that if the files already copied have undergone changes in the source location, they will be overwritten in the destination location.

Verifying data after copying

If you have very important data, it is recommended that you verify it at the end of the copying process. You can compare the sizes of the source and destination files using the command du.

du -sh "/Volumes/Source/"
du -sh "/Volumes/Destination/"

If the values ​​are identical, it means that the copying process was done correctly. You can also run the additional verification command:

rsync -avh --checksum --dry-run "/Volumes/Source/" "/Volumes/Destination/"

The data should be identical, meaning that you have the same files in the destination location as in the source location from which they were copied.

Related: Trash can't be opened right now because it's being used by another task.

In conclusion, if you have a large volume of data, it is not recommended to use the classic copy&paste command in FinderThe rsync command in the Terminal utility will save you from losing data during the transfer and the risk of starting from scratch if the copy gets stuck or interrupted.

I am happy to share my experiences in the field of computers, mobile phones and operating systems, to develop web projects and to bring the most useful tutorials and advice. I like to "play" on the iPhone, MacBook Pro, iPad, AirPort Extreme and on operating systems macOS, iOS, Android and Windows.

Leave a Comment