Time Machine on a NAS revisited - not recommended

Joined
Jun 24, 2010
Messages
1,566
Location
Encinitas, CA USA
Lightroom Experience
Advanced
Lightroom Version
First I must say that I love Time Machine. It is hands down the easiest backup and restore system I have ever used and I have tried many. It has saved me several times from various disk failures. Time Machine was designed for and works extremely reliably when connected to a local MacOS HSF journaled file system. However, there is a weakness in the implementation on a NAS that makes it quite fragile when confronted with sudden interruptions such as power failures. In order to operate on a NAS Apple uses a kind of virtual disk called a sparsebundle. This sparsebundle can easily be corrupted and this is what happened to me.

After several power hits during a recent storm my Synology NAS started beeping and telling me that my volume had crashed. After another shutdown and restart it restored the NAS but when Time Machine subsequently tried to verify the volume it failed and stopped backing up. I tried several command line procedures that I found on the net but they all failed as well. The net effect was to loose my entire local backup archive.

I would like to point out that this is not an issue with Synology as it also happens on other NAS systems even Apple's own Time Capsule.

As a quick stopgap measure I attached a 3TB external drive and added it to my Time Machine configuration. It took about 4 hours to backup my computer again and I started to breath easier.

I then told Time Machine to restart on the NAS volume. It took 24 hours to erase the old useless sparsebundle (about 3.5TB going back to 2015) and then told me it was going to take an additional 24 hours (estimated) to complete another new initial backup. At this point I reassessed the situation and decided that it was not worth the time nor the risk to try to maintain a TM backup on the NAS.

I had previously thought the 3TB was insufficient to handle my backups but it turns out that after a full backup I still have 1TB left. This turns out to provide sufficient local storage for the near term protection. Since I also have an active CrashPlan backup that goes back several years I have more than enough protection against longer term problems.

I originally purchased the Synology NAS when I also upgraded my 1TB internal data storage disk to 3TB. Because I wanted to have at least a 2X capacity for my Time Machine archive and at the time the largest capacity single drives were only 4TB which were also quite expensive. But now with 6TB, 8TB and even 10TB disks it no longer makes sense to me to use a NAS for TM backups.

-louie
 
Joined
Nov 30, 2012
Messages
296
Lightroom Experience
Power User
Lightroom Version
Classic
First, thanks for passing along your experience because I use Time Machine to complement my cloned drive backups. With Apple discontinuing the Time Capsule line, I was considering switching local network backup to an NAS so that my laptop could continue to back itself up every hour without plugging in a drive.

Can the fragility of the NAS be addressed by plugging it into backup power, such as an uninterruptible power supply?

I've encountered the problem with Time Machine sparsebundles being unable to verify, but since I started using more advanced techniques to repair the sparsebundles, I haven't had to lose an archive and start over. I first try DiskWarrior, which usually solves the problem quickly. But last time it was messed up badly enough that it was only fixed by using a somewhat complicated procedure involving hdiutil (I think) in Terminal.
 
Joined
Jun 20, 2009
Messages
14,670
Location
Houston, TX USA
Lightroom Experience
Power User
Lightroom Version
I use Time Machine with a Time Capsule. The Time Capsule is Apple's take on a Network File Server (NAS). So far it has worked flawlessly. With two Macs, the 3TB Time Capsule filled quickly. I have added another 5TB EHD attached to the Time Capsule.
A firm believer in redundancy, I have 2 additional backups. One is a locally attached EHD accessed alternately by Time Machine and the other is a locally attached Acronis backup drive.
 
Joined
Jun 24, 2010
Messages
1,566
Location
Encinitas, CA USA
Lightroom Experience
Advanced
Lightroom Version
As far as I can tell the problem has to do with the sparsebundle itself and not necessarily the NAS reliability. Keep in mind it is not just the NAS that has to be running. Your host computer, all the network equipment, and the NAS. If any one of these drop off during a critical update of the sparsebundle it can be corrupted.

This seems to be enough of an issue that Time Machine will periodically run a file system check (fsck) of sparsebundle which will fix any minor problems it finds. I think that this has helped make it more reliable when using a NAS. But sometimes it is not repairable. When that happens you get the following alert:

Time Machine completed a verification of your backups.
To improve reliability, Time Machine must create a new backup for you.
Which is essentially that your backup archive has been trashed, so click here to erase and start over from scratch.

Here is a write up of some additional steps you can try to recover a sparsebundle that Time Machine has given up on: Fix Time Machine Sparsebundle NAS Based Backup Errors. I tried all these and was unable to repair my backup.

It is unfortunate that Apple has not come up with a better strategy for backup to NAS devices.

-louie
 
Joined
Nov 30, 2012
Messages
296
Lightroom Experience
Power User
Lightroom Version
Classic
If I'm correctly interpreting what I've read around the Web, Time Machine uses sparsebundles in a way that the HFS+ file system was not designed to handle very well, leading to the types of issues we've seen like backup archives becoming fragile when they get very large.

Apple has now implemented their new APFS file system across macOS and iOS, but not completely. One of the remaining limitations is that Time Machine cannot back up to an APFS-formatted external drive, at least not yet. (They do seem to have local Time Machine snapshots working on APFS). There seems to be hope out there that if/when Apple figures out how to implement Time Machine on an external or networked APFS drive, using special features of APFS (like snapshots) should result in faster and more reliable Time Machine backups. Hopefully that would improve the situation on NAS, but we'll have to wait and see.
 
Last edited:
Joined
Jun 24, 2010
Messages
1,566
Location
Encinitas, CA USA
Lightroom Experience
Advanced
Lightroom Version
As the article you linked to states, Time Machine requires some type of HFS formatted drive to work. The sparsebundle disk image is essentially a virtual HFS partition. TM uses some tricks available on a directly attached HFS volume that are not easily available on a network mounted volume. Their workaround is to insert use a sparsebundle disk image that allows them to use the same tricks.

I believe that APFS is part of a totally new way to access and manage storage and is still in the early stages of implementation. Initialy it was only used for SSD devices. As I was formatting my 3TB drive the other day I noticed that the Disk Manager offered the option to use APFS on my spinning hard drive. I didn't try that as the drive was going to be used for Time Machine. But I would like to see if that is working. I quite like the idea of local snapshots being available on all my hard drives.

-louie
 
Top