Check your Backup target

Check your Backup target

Time Machine is built into your macOS allowing you to effortlessly backup your files. When you have a new Mac, Time Machine can quickly pick-up your files and start backing them up into your designated medium with no time wasted. However, as you start using your new Mac more and more, accumulating files, installing applications, apps creating numerous configuration files, etc. you may see Time Machine slowing down considerably.

In my case, I was backing my Mac?s built-in 512GB SSD-based storage and I had somehow managed to accumulate so many files that Time Machine was stuck on the ?Preparing backup? status for more than an hour. As soon as backup was starting, there were so many tiny, little files to be checked for changes that just to backup a couple of GBs required several hours. My Time Machine was practically useless, so I had to find what was causing such a delay. Here are a few things you could check too.

Make sure the medium on which you backup is a fast, quality drive. If you backup on an attached USB drive, ensure that you are using a USB 3.x drive. A quick and easy way to verify your drive?s USB compatibility is to observe the actual USB plug itself. If it is a blue one (like the one in the following photo) you then have a USB 3.x device.

Image for postPhoto by Sara Kurfe on Unsplash

Have a fast Network connection

If you backup to a networked Time Machine, make sure you have a Gigabit connection to it (or better). Try to not backup over WiFi unless this is the only connection you have available, as WiFi is slower.

If you have a spare, old machine and you want to create your own networked Time Capsule you can check the following post, it only takes 5′:

Build Your Own Time Capsule in 5′

Mac network backup with Time Machine using Docker

Un-throttle backupd File I/O

In order for Apple to offer the best possible user experience on macOS, it throttles requests made to the underlying filesystem by processes with low-priority. One of these processes? You guessed it! It?s the process responsible to backup your files when running Time Machine, the backupd process.

You can ask macOS to remove such throttling by executing the following command in your Terminal:

sudo sysctl debug.lowpri_throttle_enabled=0

However, keep in mind the following two things:

  • You are not only un-throttling Time Machine but every other low-priority process too. This may make your Mac appear sluggish.
  • Un-throttling remains active until the next time you reboot, so if you witness another slow backup you can re-execute it. The good thing is that you can issue this command in the middle of a backup and will become applied immediately without having to restart the backup.

When you no longer need the un-throttling effect, you can reenable it by issuing:

sudo sysctl debug.lowpri_throttle_enabled=1

Finding the Root Cause

I left for last the most complex, low-level debugging tool you have available allowing you to monitor your filesystem access in real-time. This is a powerful tool allowing to investigate what is the actual root cause of Time Machine?s delay. In particular when you face long delays waiting for ?Preparing backup? this kind of investigation can shed light to otherwise mysterious delays.

Open a Terminal and issue the following command:

sudo fs_usage -w |grep -i backupd |grep -i fsctl

Upon entering your user-credentials you will start seeing many, many files appearing in your terminal window. These are the files that Time Machine is checking for changes. By carefully observing the patterns and folders being accessed, you can identify folders which may have thousands (or even, tens of thousands) of small files that you don?t need to backup and by excluding them you can considerably speed up your backup times.

In my Mac, I had over half a million (!) tiny, little data files created by Disk Drill under /System/Volumes/Data/.cleverfiles directory. Excluding this folder in my Time Machine turned my ?Prepare for backup? phase down to less than 10′.

As a quick reminder, you can add local folders to be excluded from your Time Machine backup by opening Time Machine in your System Preferences and via Options specify the files and folders you don?t want in your backups as presented next:

Image for postExcluding files and folders from Time Machine backup

Time Machine is a great built-in tool in macOS but in a heavily-used Mac, where lots of data and apps come and go, it may start to become slow. You can try the techniques presented here to speed up your backup time. What other techniques are you using to speed up your Time Machine backups? Did you manage to speed up your own backups? Let me know in the comments section.

? Do you like to see Apple + Mac stories like this one?You can follow us on Medium, Twitter, Facebook, or LinkedIn.?? Do you like to share your stories about Macs? You can!We?re a publication from Mac users to Mac users. Write a story andsend it to us, we promise to publish all quality stories


No Responses

Write a response