DEV Community

Discussion on: Migrating to a New Mac for Programmers

 
brandonweiss profile image
Brandon Weiss

Oh, I knew Time Machine did file-level copying for incremental backups, I thought for a moment it might do block-level when restoring, but now that I think about it I don’t think that’s actually possible. In that case, I’m unclear why you’re suggesting migrating using a Time Machine backup rather than computer to computer? Is there some benefit I’m not aware of?

Yes, it’s almost definitely faster to do a block-level copy between the old computer and the new computer, however that requires you to have a third computer, which most people don’t have. I didn’t necessarily explicitly say this anywhere in the post, but the explanation was targeted at people who are doing the normal migration path, but it’s slow and aren't sure why or whether there is something simple they can do to fix it.

Regarding the speed, it’s not quite that simple… Gigabit ethernet is 1 Gbps, USB 3.1 is 10 Gbps, and Thunderbolt is 40 Gbps. “Gbps” is “gigabits per second” (not gigabytes per second). There are 8 bits in 1 byte, so Thunderbolt can theoretically do 5 GB/s or 5,000 MB/s. But the real bottleneck nowadays is the hard drive. The best SSDs can write at ~500 MB/s, but most SSDs write at around 300–400 MB/s, and that’s the theoretical maximums. Doing a file-level copy you’re going to have more overheard, so 105 MB/s seems fairly reasonable to me.

Thread Thread
 
rhymes profile image
rhymes

I suggested using TM because in an ideal scenario you should already have a backup of your primary computer's hard drive anyway. So you attach such backup (being through a network or a local USB drive) to a computer and start the restore. MacOS even asks you if you want to restore from a backup after installing the os.

It's true that transferring a single zip file is faster but my hard disk is full of images, videos, source code and documents.

It's going to take hours to zip all of that (and I don't really have the free space to hold such zip file on the same drive).

In my case zipping will take hours, plus transferring, plus unzipping which is the still going to take considerable time.

That's why I'm better off with time machine, just a different scenario I guess

Thread Thread
 
brandonweiss profile image
Brandon Weiss

I think I must still be missing something here… my understanding is that restoring via another Mac and restoring via Time Machine backup (assuming the backup is on an SSD) are effectively identical. You seem to be saying that you’re better off restoring via a Time Machine backup than zipping up your code folder, but I don’t understand why? What is different about restoring via a Time Machine backup?

Thread Thread
 
rhymes profile image
rhymes

You already have a backup in this scenario so you just have to restore to the new computer. No zipping time.

Thread Thread
 
brandonweiss profile image
Brandon Weiss

Right, I get what you’re saying, but I don’t understand why? Why would restoring from a Time Machine backup obviate the need to zip up the code folder? Why would restoring from a Time Machine backup happen more quickly than restoring from another Mac?

Thread Thread
 
rhymes profile image
rhymes

Zipping and unzipping also takes time, my current "dev" folder is 8 GB, around 425 thousand files.

Restoring from TM might take less time because you don't have the time you spend zipping and unzipping a giant folder.

Your post is about migrating from another Mac, I suggested that if someone already has a backup of that Mac, attaching the backup to the new machine might take less time, given that you don't just have only the "dev" folder, but at least your entire $HOME if you want everything to work correctly.

So, in your scenario you still have to use migration assistant to copy the files minus the dev folder which will be transfered zipped. So you add the time to transfer everything except the dev folder, the time to zip the dev folder in the first place and the time to unzip it in the second computer.

I was just proposing that in some scenarios leaving the dev folder unzipped and let TM restore that it might take more or less the same time, that's it :)

Thread Thread
 
brandonweiss profile image
Brandon Weiss • Edited

OK, I think I see where the confusion is—I thought you were saying that there was something special you knew about Time Machine backups that allowed them to somehow be migrated/restored faster.

Migrating from a Mac and migrating from a Time Machine backup (assuming the backup is on the same type of hard drive as the Mac) are effectively equivalent. They should take the exact same amount of time. In my case, that was at least 20+ hours because of the overhead of doing a file-level copy on so many files.

My dev folder is ~9 GB and ~340,000 files. It took 15 minutes to zip it and ~3 minutes to unzip it.

With a zipped dev folder, migrating from another Mac took 1 hour and 45 minutes. That means it definitely doesn’t make sense to migrate using Time Machine. It’s not even close… the time it takes to zip and unzip the dev folder is tiny compared to how much time you save during the migration.

Thread Thread
 
rhymes profile image
rhymes

Ok got it. My experience of a full restore from a TM backup is of a few hours so I never had to consider a plan B. I'll keep that in mind if I have to

Thread Thread
 
brandonweiss profile image
Brandon Weiss

👍🏼 Yeah, I’ve heard wildly different numbers on how long migrations take. I know some programmers for who it only takes a few hours and I know other programmers like myself for who it takes a whole day. 🤷🏼‍♂️