Why is Time Machine backing up to .sparsebundle file?
-
21-04-2021 - |
Question
In the past, I had used only an external hard drive for my backups. It worked great, and it backed up to folders, in a way that I could go to individual files in the backup. I decided that since I was on a laptop, I should be backing up wirelessly (so I don't have to keep it plugged in). After my first painfully long backup to my old Time Capsule, I realized the file was not a folder but a .sparsebundle file. What is this? How do I change it back?
Solution
I'm pretty sure you can't, and you wouldn't want to. The OS only bypasses the bundle for locally attached backup destinations.
- Direct attached storage (DAS) uses the HFS+ filesystem and /Backups.backupsdb folder structure
- Network attached storage (NAS) uses the sparse bundle format to embed a HFS+ filesystem on whatever filesystem that the NAS uses natively.
Time Machine's backup format plays some very interesting tricks with the Mac OS Extended filesystem that aren't really possible over a generic network storage volume. It's also optimized to minimize network traffic when files change. This speeds both backup, browsing and restore operations and minimizes the volume of data file changes on the NAS for small changes on the source disk.
In order to get TM to work over a network connection, it stores a disk image (in sparse bundle format) on the network server, and mounts that locally on the client. Since it's mounted locally, the client has full access to the filesystem and can play all of the necessary tricks.
So, without the .sparsebundle, you wouldn't be able to back up over the network since it optimizes the amount of data sent to the Time Capsule when a file changes as well as reduces the load on the Time Capsule to handle easier IO to the disk.
You can still mount the sparse bundle image on any OS X machine and navigate to files. The only drawback might be if you are using an OS that doesn't have a filesystem plug in for sparse bundle storage format.
OTHER TIPS
A Sparsebundle is a disk image format introduced by Apple in OSX 10.5 as a method of effectively using space for backups on a disk. This is an expandable/retractable disk that will only take up as much room as the data inside of it up to a predefined limit (in the case of TM, the size of the partition). This also allows for incremental backups in which parts of a file can be layered on top of one another so you can perform a revisional history instead of replacing a file with a full new copy each and every time.
As for why, Apple reserves the right to have their proprietary backup tool save data under whichever format they think would work best. As such, they developed their own. At this time, there is no way to make Time Machine use a different format - you will have to use a different backup utility to achieve that.
I'm pretty sure Time Machine uses the .sparsebundle format only if you encrypt your backup.
You have two options if you want to be able to browse the contents of your backups. The first is to deselect the option to encrypt your backups. The second option, which I would recommend is to just double click on the .sparsebundle and let OS X mount it as a drive (you'll need the encryption password). That little bit of effort will get you what you want—you'll be able to browse the backups—without sacrificing security.
I formatted an external USB drive as APFS Encrypted
format, then I ran Timemachine backup. This produced a single sparse bundle file image, which I didn't like.
I went back, reformatted the same USB drive as Mac OS Extended (Case-sensitive, Journaled, Encrypted)
format and reran the Timemachine backup. This produced the Backups.backupdb
browsable folder structure that I prefer.