Amazon's Choice for time machine external hard drive WD 2TB My Passport for Mac Portable External Hard Drive - Blue, USB-C/USB-A - WDBA2D0020BBL-WESN 4.5 out of 5 stars 2,747.
Time Machine Backup/Restore Failed
Mac users, who're currently running macOS Catalina or Mojave, report that they got an issue with Time Machine. Mainly, it's about Time Machine backup failed to back up the scheduled files to the configured backup disks, let it be the Time Capsule drive or third-party drive. Hence, how to repair Time Machine backup becomes the topic we're going to discuss here.
Make sure your time machine backup disk is mounted (the simplest way to do it is opening the Time Machine application). The format of the backup folders created by Time Machine is YYYY-MM-DD. This lets you fool Time Machine into using less than the whole disk by putting large files (such as non-sparse disk images) on the disk before you turn on Time Machine for the first time. Once the sparse image bundle has been created, you can remove the padding files and the Time Machine backup won't grow beyond this original limit.
You can read on or jump to the issue & solution you're most concerned about.
Workable Solutions | Step-by-step Troubleshooting |
---|---|
Issue 1. Can't Backup or Restore | Check Time Machine system requirements > check your Mac..Full steps |
Issue 2. Backup Corrupted | Create a new backup > restart Time Machine > repair with terminal command..Full steps |
Issue 3. Backup Missing | Download software to recover missing backups > repair unrecognized..Full steps |
Issue 1. Can't Backup or Restore Your Mac Using Time Machine
One phenomenon to get Time Machine backup failed is that you can't back up or access an existing Time Machine backup, or restore from an earlier backup won't work. According to Apple's official instructions (https://support.apple.com/en-us/HT204157), when you have a problem with Time Machine, check these things if you see an alert that Time Machine is unable to back up your data, or if you can't select your backup disk in Time Machine preferences.
Fix 1. Check Time Machine System Requirements
- External hard drive connected to a USB, FireWire, or Thunderbolt port on your Mac
- Time Capsule or macOS Server on your network
- External hard drive connected to the USB port of an AirPort Extreme Base Station (802.11ac) on your network
Fix 2. Check Your Mac
- Make sure that your Mac software is up to date.
- Restart your Mac and see if the issue continues.
Fix 3. Check your AirPort Base Station
- If you're using an AirPort Time Capsule or a drive connected to an AirPort Extreme Base Station, make sure that your AirPort firmware is up to date.
- Restart your base station and see if the issue continues. To restart, unplug the base station from AC power for 5 seconds, then plug it back in.
Fix 4. Check Your Network Connection
If you back up to a server, AirPort Time Capsule, or drive connected to your AirPort Extreme Base Station, make sure that your Mac is connected to the same network as your backup drive. You can select your wireless network from the Wi-Fi status menu.
Fix 5. Check Your Backup
If you back up to a server, AirPort Time Capsule, or drive connected to your AirPort Extreme Base Station, make sure that your current Time Machine backup doesn't have any issues that could prevent further backups:
- While holding down the Option key on your keyboard, click the Time Machine menu in the menu bar, then choose Verify Backups.
- If Time Machine finds an issue with your backup, it displays a message with details. Follow the onscreen instructions.
Fix 6. Check Your Drives
- If you're using a drive connected to a port on your Mac or AirPort Extreme Base Station, make sure that the drive is turned on.
- If you're using a USB hub or a similar device, try connecting the drive directly to your Mac or base station.
- If you're backing up to an external third-party drive, check with the drive manufacturer to make sure the drive's firmware is up to date.
- If you're backing up to an external drive, check the formatting of the drive. Time Machine requires that an external drive be formatted like a Mac startup disk: Mac OS Extended (Journaled) with a GUID Partition Table (GPT). If you select a differently formatted drive for use with Time Machine, your Mac automatically prompts you to erase it for Time Machine.
- Reformatting a disk erases all data stored on the disk, so you might want to move important files to another disk first.
If your drive is already formatted correctly, turn off Time Machine, then check it for problems:
- To check the drive of an AirPort Time Capsule, follow the steps to verify an AirPort Time Capsule drive.
- To check an external drive connected to your Mac, open Disk Utility from the Utilities folder of your Applications folder. Then use the First Aid feature in Disk Utility to verify your disk. Do this for your startup disk as well.
- You can turn Time Machine back on after your drives are verified or repaired successfully.
Issue 2. Time Machine Backup Is Corrupted
What's a corrupted Time Machine backup? Below are some backup corruption symptoms.
- Fail to complete Time Machine backup
- can't access time machine backups
- Time Machine keeps asking to create new backups
- Searching for time machine backups taking forever
- Time Machine disk or external device becomes unrecognized
How to repair a corrupted Time Machine backup? According to some experienced users and professional geeks, when Time Machine corrupted, it can be fixed by the following four troubleshooting methods.
Fix 1. Create New Backup
If Time Machine keeps asking you to create new backups, click Create new backup to start the new backup then. So that it can work smoothly later.
Fix 2. Restart Time Machine
Restart Time Machine several times may also help. You may need to switch Time Machine to On-Off-On and then reboot the Time Machine again.
Fix 3. Swap out The Hard Drive
Another solution to repair Time Machine is to set up a new external hard drive with Time Machine as a backup drive.
Fix 4. Repair Corrupted Time Machine with Terminal command
If Time Machine stops responding or even not working on Mac, to repair the corrupted Time Machine becomes tough yet still resolvable with Terminal command.
- Notice:
- Before starting the process, You should stop Time Machine: Time Machine Preferences > Toggle Time Machine 'OFF'.
- Step 1: Open Terminal on Mac and type: $ sudo su - and hit Return.
- Step 2: Type: $ chflags -R nouchg '/Volumes/.sparsebundle' and hit Return.
- If you don't know the TM name, go to Time Machine Prefernces and check out. Or type: $ ls '/Volumes/ and hit Return.
- Step 3: Type: $ hdiutil attach -nomount -readwrite -noverify -noautofsck '/Volumes/.sparsebundle' and hit Return.
- Step 4: Type the below command and hit Return each time:
/dev/disk5 GUID_partition_scheme
/dev/disk5s1 EFI
/dev/disk5s2 Apple_HFS - Step 5: Type: $ fsck_hfs -drfy /dev/diskxs2 and hit Return. After this, if you receive 'The volume was repaired successfully', congratulations.
But if Terminal warns you 'The volume could not be repaired', relax and continue with next command. - Step 6: Type: $ fsck_hfs -p /dev/diskxs2 and hit Return.
- Step 7: Type: $ fsck_hfs -drfy /dev/diskxs2 and hit Return. Wait for the process to complete.
- Step 8: Type: $ vi '/Volumes//.sparsebundle/com.apple.TimeMachine.MachineID.plist' and hit Return.
Change the value of integer from 2 to 0 within that file.
Issue 3. Time Machine Backups Missing
When you cannot access to Time Machine or Time Machine corrupted, you are highly recommended to get backup data back first. How?
Fix 1. Recover Missing Backup Image with Software
If the Time Machine backup disk can be opened but nothing appears, the best way is to scan and restore all lost Time Machines' Backups.backupdb files. Here we'd like to recommend you try EaseUS Data Recovery Wizard for Mac which supports users to restore all lost data from different situations within only 3 steps. Download EaseUS Data Recovery Wizard for Mac and restore Time Machine backups now:
Step 1. Select the disk location (it can be an internal HDD/SSD or a removable storage device) where you lost data and files. Click the 'Scan' button.
High sierra compatibility checker. Step 2. EaseUS Data Recovery Wizard for Mac will immediately scan your selected disk volume and display the scanning results on the left pane.
Step 3. In the scan results, select the file(s) and click the 'Recover Now' button to have them back.
What's more, if you lost files on Mac or external storage devices, you can also apply EaseUS Mac data recovery software to easily recover files on Mac without Time Machine backup.
Fix 2. Repair Unrecognized Time Machine Drive
When the Time Machine backup disk or external hard drive becomes unrecognized, as a result, backups are missing, you can first mount it on Mac and then run First Aid on Time Machine disk with disk utility.
Step 1: Connect the Time Machine backup external hard drive to Mac. Launch Disk Utility, check external hard drive at the left panel.
You'll see that the external hard drive is greyed out, marked as untitled. (Untitled means unmounted on Mac computer.)
Step 2: Select the untitled external hard drive and click the 'Mount' button from the Disk Utility bar.
Step 3: Select Time Machine drive at drive level on the left panel of Disk Utility and run First Aid.
Step 4: Select Time Machine drive at volume level and run First Aid.
Wait for the process completes, check if Mac computer can recognize your backup disk and open it in Time Machine again.
Conclusion
Regarding the topic 'Time Machine backup failed' and 'how to repair Time Machine backup', we gathered all feasible solutions to help you resolve the various issues with Time Machine on your Mac. If you have further Time Machine problems, click for more Time Machine guidelines from the following collection.
Contents
- 4 Create network sparse bundle
- 6 Mount sparse bundle
- 7 Copying contents
Apple knows better
It is sad that Apple doesn't provide any backup migration wizard to move backups from locally attached disk to network share. The only option Apple provides is to start backup from the scratch on network share loosing all your backup history. This makes your network Time Machine backup absolutely useless since you can't search for the file that you accidentally deleted a few years ago.
This instruction will help you to migrate your locally attached disk with Time Machine backups and whole backup history to Time Machine compatible network share.
There are different ways to do the same. All the ways have their pros and cons and I would like to share my observations and probably save a little bit of your time.
Configuration makes sense
This instruction is based on the configuration I have. If youth is different then you will probably need to slightly alter the plan.
My configuration:
- MacBook Pro (Retina, 13-inch, Early 2013), 512GB SSD, macOS Mojave 10.14.6.
- External USB3 backup magnetic disk 1TB with backups from 2013 year,
HFS+ case-insensitive, not encrypted. - NAS with time machine Samba share pointing to another external USB3 magnetic
disk formatted with ext4 (running on Odroid-XU4 with Arch Linux).
NAS Samba v4.10.10 config:
NAS Avahi config:
This configuration makes Time Machine share discoverable and easy mountable using Finder in macOS.
Deltarune and undertale. The NAS disk I have is already partitioned and formatted using standard Linux tools. It has two GPT partitions:
- 1TB for Time Machine backup, filesystem: ext4
- remaining for files, filesystem: exfat
I was not able to get exfat volume to work as Time Machine backup due to the lack of extended attributes support on exfat volumes. The fastest and most stable filesystem with extended attributes on Linux is ext4. This will make things easier on Linux side and… more complex on macOS side.
I have also this option set but not sure if it is needed these days:
Recommendations
- Use wired connection for both NAS and your laptop to speedup backup migration in case if you would like to migrate over the network.
- Consider attaching both source backup disk and target backup disk (from NAS) to mac and do initial local copy (much faster write speeds if both disks are USB3). In my case local copy is around 90Mb/sec vs 12Mb/sec over network.
- Use larger sparse bundle band size to improve backup performance, but this could be a bad advice if your are planning to use encrypted sparse bundle.
- Consider having sparse bundle size the same as backup disk size. You won't need to resize sparse bundle disk in that case and that will save time.
Create network sparse bundle
Firstly you will need to create compatible sparse bundle file on network drive while your target backup disk is connected to hand made time capsule server. Later you can temporarily disconnect it and connect to your mac to do an initial copy.
Method 1: Let macOS to do that for you
You can create it manually but the easies way is to let Time Machine to create it for you. Just open Time Machine, add new backup disk on network share, do not replace existing backup disk, initiate backup manually and don't forget to disable automatic backups. You can even choose option to encrypt backups. Cancel the backup once Time Machine will start to show file copying progress.
After that step is completed you should have sparse bundle {ComputerName}.sparsebundle
on your Time Machine network share.
Method 2: Manually
You can create sparse bundle image using Disk Utility on network share: {ComputerName}.sparsebundle
.
You can get know computer name by running: scutil --get ComputerName
There will be some manipulations needed with sparse bundle plist
files to make image be properly recognizable by Time Machine. Read more here: https://gist.github.com/martian111/e0d9885004eb56fd6abf3d1ba7671737
You can also create encrypted sparse bundle if you want.
I did not follow this method so there are no more details in this section.
(optional) Change band size on sparse bundle
This is OPTIONAL procedure but can significantly improve backup performance.
You can find more details in this article: https://edoardofederici.com/improve-time-machine-performance/
Below I would outline shorter version that doesn't require too much scripting in Terminal.
If you are planning to use encrypted sparsed bundle then you should probably avoid changing band size as there are some reports that it could make performance even worse: https://gist.github.com/SebastianJ/b3e9af8a641df1dc73c0
Default sparse bundle band size is 8MB = 16384 blocks. Too small or too big band size could slow down the backup. Choose band size depending on how fast your network connection, how fast your target network and how big the hard disk you are backing up.
Command line band size for hdiutil
is specified in 512 byte blocks, so 8MB = (8 * 1024 * 1024 / 512) blocks = 16384 blocks
.
I played a little bit and found that local copying speed to sparse bundle with 32MB band size is twice higher than with 8MB band size (100Mb/s vs 50Mb/s).
Hard Disk Sizes
Since I would like make target sparse bundle to be encrypted I decided to keep band size as it is and skip band size conversion.
By the way, here are migration steps:
- Unmount sparse bundle image using Disk Utility if already mounted (do not eject).
- Mount Time Machine volume from NAS.
- Convert band size using
hdiutil
command below. - If you will choose to use encryption then password will be asked.
- Move original sparse bundle somewhere as backup.
- Rename new sparse bundle to have the same filename as original.
Conversion without encryption:
Conversion with encryption:
There will be some manipulations needed with sparse bundle plist
files to make image be properly recognizable by Time Machine. Read more here: https://gist.github.com/martian111/e0d9885004eb56fd6abf3d1ba7671737
Mount sparse bundle
Method 1: From network drive (easy, slow)
If you can connect your Mac over the wire or if your wireless network is fast and your Mac supports 802.11ac then it could be wise and convenient to do migration over the network: from backup disk connected to Mac to network drive connected to the NAS.
Time Machine Disk Size Calculator
If you are not in rush and it is okay to have your Mac copying in background files for a few days then it could be a good option too, especially, if second method doesn't work for some reason or looks too complex.
Unfortunately, my Mac is considered 'vintage' these days (in terms of Apple) and the max network bandwidth is just around 200Mbit/s between NAS (wired) and Mac (wireless) using default wireless router provided by Verizon. With Samba and sparse bundle incapsulation total bandwidth averages 100Mbit/s. Copying 1TB of data as it is on 100Mbit/s should take around 20-30 hours. The longer it runs, the higher the chance that something will go wrong, so I decided to do faster local drive cloning.
Method 2: From local drive (complex, fast)
Local cloning should be the fastest way and faster than any network copying.
There is a special driver needed for macOS to be able to write to Linux ext4 formatted volume, that I have on Time Machine backup volume on the disk, connected to the NAS.
There is proprietary driver Paragon ExtFS that can read/write ext2/3/4 volumes. You can purchase it or install trial version (10 days should be more than enough): https://www.paragon-software.com/us/home/extfs-mac/
There is also fuse2fs application from e2fsprogs package that can do almost same and be installed using HomeBrew (did not test this path).
Steps:
- Install Paragon ExtFS and reboot.
- Detach hard drive that was connected to NAS and attach it your Mac. New disk should appear in Disk Utility and, if ext4 driver is installed, ext4 partition with Time Machine backup should be auto mounted and available in Finder.
- Open your target Time Machine volume and open target sparse bundle on it to mount it (the one that was previously created).
- Now you should have both source disk and target sparse bundle mounted and you can copy the contents between them.
Copying contents
Method 1: Copy using Finder (slow)
Your external backup disk most-likely has case-insensitive HFS+ and the sparse bundle will have by default case-sensitive HFS+ so copying Backups.backupdb
using Finder won't work by default.
Steps:
- Reformat sparse bundle volume to case-insensitive HFS+ (same filesystem as external backup disk) using Disk Utility.
- Manually set ownership flag on it using Terminal and the remount:
sudo diskutil enableOwnership {PartID}
. - Only after that you can copy
Backups.backupdb
using Finder from one volume to another volume.
Time Machine Disk Size Without
But it will take EXTREME amount of time. In my case even whole night was not enough to build just list of files to copy. I can only imagine how long will it take to also copy files. I gave up and decided to go forward with local cloning solution.
Method 2: Copy using disk cloning (fast)
There is an easier and faster way – clone external backup disk to sparse bundle disk using dd
as it is. No need to care about case sensitivity or ownership flag – your sparse bundle will have exactly the same byte to byte state as your external backup disk. Your sparse bundle volume must have the same or a little bit larger size than source disk. You can resize (grow) HFS+ partition on sparse bundle disk after but it is not fast.
Steps:
- Make sure that both source backup disk and target sparse bundle disk are visible in Disk Utility.
- Unmount partitions (but not eject volumes) on source disk and target image.
- Enable 'Terminal' to have full disk access:
- Open 'System Preferences'
- Then 'Security and Privacy'
- Then 'Privacy'
- Then 'Full Disk Access'
- Press '+' and add 'Terminal' application
- Quit 'Terminal' if it is already started and start 'Terminal' application.
- Start copy process
- Run
sudo dd if=/dev/r{SourceDisk} of=/dev/r{DestinationDisk} bs=2m
- Example:
sudo dd if=/dev/rdiskA of=/dev/rdiskB bs=1m
- Use
r
prefix, this will make process faster - Use disk ID, not partition ID
- Grab identifiers from
Disk Utility
or usingdiskutil list
. - Block size
1m
should improve performance. You could experiment with different values. Terminate the process withControl + C
, unmount volume again (otherwise macOS will auto mount it) and test the speed. - Press
Control + T
to see the progress and the speed. - If you have HomeBrew and
coreutils
installed then you could use GNU dd that can automatically report progress - Run
sudo gdd if=/dev/r{SourceDisk} of=/dev/r{DestinationDisk} bs=1M status=progress
- Example:
sudo gdd if=/dev/rdiskA of=/dev/rdiskB bs=1M status=progress
- Block size units have slightly different format (
M
instead ofm
).
- Run
- Rename HFS+ volume on sparse bundle disk to
Time Machine Backups
after
(not sure if it is required, but macOS created sparse bundles have this name
for backup volume). - Sparse bundle won't have exactly the same size as source disk, so need to fix that:
- You could skip this step if source backup disk and sparse bundle have the same or about the same size.
- Repair sparse bundle partition map (this will grow partition size in GPT)
- Run
sudo diskutil repairDisk {SparseBundleDiskID}
- Example:
sudo diskutil repairDisk diskX
- Grow backup HFS+ volume in sparse bundle (grow volume size to partition size)
- Run
sudo diskutil resizeVolume {TimeMachineBackupPartID} 0
- Example:
sudo diskutil resizeVolume diskXs2 0
- Resize will also trigger HFS+ file system check and it is good to confirm that partition after this hardcore migration is still not damaged
- This procedure will take a lot of time because file system check is slow.
Paragon ExtFS did not show perfect stability for me. It crashed macOS a few times until succeded.
The only time the process has succeded was with these steps and in ~5.5 hours:
- fresh rebooted macOS
- all applications besides Terminal were closed
- 8MB band size was used (this slowed down copying process to 50MB/sec)
gdd
instead ofdd
- disabled macOS sleep using Amphetamine app
Let me know if you will find what exactly can crash the copying process, so I can share more details here for others.
Testing network backup
Battle blizzard net. Eject NAS drive from your Mac and connect back to NAS.
You will most-likely need to fix ownership on files to make them readable from network:
Initiate backup using Time Machine menu on macOS.
Mac could probably ask about 'The identity of the backup disk has changed since the previous backup'. This is fine for initial backup because this is exactly what we did. Click 'Use This Disk' to continue.
The initial backup should be successfully completed. You could enable automatic backups back after.
I would recommend to use both backup solutions (local disk and network disk) for some time before you could confirm that network backup works well in terms of stability and performance.
Conclusing
I hope this article will save some of your time. Let me know please if there is anything I can fix to make this article better.
Thank you and happy migration 😉