Can linux mount a normal Time Machine sparse bundle disk image directory?

Question

I am looking to see if Linux can mount and read the files natively stored on a Time Capsule over a network share. Like this question, I am looking for something that replicates at least read-only function of hdiutil to attach and then mount a sparse bundle disk images.

The SMB mount is easy since the Time Capsule shares using both AFP and SMB, but I’m not so sure the sparse disk bundle can be mounted as the reconstituted HFS+ directory.

Bonus points for a working mount command or pointer to the appropriate package that parses this DMG format.

In case it’s not clear – this is how the band files look to me when mounted from a Mac in Terminal and what I expect Linux to see without the ability to mount the actual file system that is encoded in a multitude of binary band files.

host:iMac.sparsebundle mike$ ls -la
total 24
drwxrwxrwx@     7 mike  staff      264 Jul  5 10:01 .
drwx------      6 mike  staff      264 Mar 26 13:11 ..
-rwxrwxrwx      1 mike  staff      499 Feb 24 15:33 Info.bckup
-rwxrwxrwx      1 mike  staff      499 Feb 24 15:33 Info.plist
drwxrwxrwx  31101 mike  staff  1057390 Jun 17 20:19 bands
-rwxrwxrwx      1 mike  staff      532 Jun 24 22:06 com.apple.TimeMachine.MachineID.plist
-rwxrwxrwx      1 mike  staff        0 Feb 24 15:33 token
host:iMac.sparsebundle mike$ ls -la bands | head -10
total 1582092552
-rwxrwxrwx  1 mike  staff  8388608 Jul  5 08:33 0
-rwxrwxrwx  1 mike  staff  8388608 May 31 13:02 1
-rwxrwxrwx  1 mike  staff  8388608 Jun 24 22:16 10
-rwxrwxrwx  1 mike  staff  8388608 Mar 19 17:15 1000
-rwxrwxrwx  1 mike  staff  8388608 May 31 00:50 10000
-rwxrwxrwx  1 mike  staff  8388608 May 31 00:50 10001
-rwxrwxrwx  1 mike  staff  8388608 May 31 00:50 10002
-rwxrwxrwx  1 mike  staff  8388608 May 31 00:50 10003
-rwxrwxrwx  1 mike  staff  8388608 May 31 00:50 10004
host:iMac.sparsebundle mike$ ls -la bands | tail -10
-rwxrwxrwx  1 mike  staff  8388608 May 31 00:51 fff6
-rwxrwxrwx  1 mike  staff  8388608 May 31 00:51 fff7
-rwxrwxrwx  1 mike  staff  8388608 May 31 00:51 fff8
-rwxrwxrwx  1 mike  staff  8388608 May 31 00:51 fff9
-rwxrwxrwx  1 mike  staff  8388608 May 31 00:51 fffa
-rwxrwxrwx  1 mike  staff  8388608 May 31 00:50 fffb
-rwxrwxrwx  1 mike  staff  8388608 May 31 00:50 fffc
-rwxrwxrwx  1 mike  staff  8388608 May 31 00:50 fffd
-rwxrwxrwx  1 mike  staff  8388608 May 31 00:50 fffe
-rwxrwxrwx  1 mike  staff  8388608 May 31 00:50 ffff
host:~ mike$ ls -la bands|wc -l
   96636
Asked by bmike

Answer

Unfortunately the path to finding things in a sparsebundle from Linux is not straightforward. It can be done, but it requires interpreting some inode information that Apple embeds in the hardlinks to find the actual file in the sparsebundle. This MacWorld hint describes how you go about figuring out where a hardlink in a sparsebundle points to in terms of the actual file so you can access it from a Linux system. It deals with a Time Machine disk that’s been attached as a local disk to a single machine.

In your case <mount point>/Backups.backupdb is most likely <machinename>.backupdb`.

I’m not sure whether <mount point>/.HFS+ Private Directory Data exists in the same spot for a shared disk being used for Time Machine backups by multiple machines. You’ll have to do a little ls -la inspection of the disk and sparsebundles to find that.

But otherwise those MacWorld instructions will help you retrieve files on a Time Machine bundle, from Linux.

A update regarding the mount point.

I did some experimenting based on your updated question. It looks like the mount point should be the *.sparsebundle directory and not the drive. If I mount the drive in OS X and the go to /Volumes/Remote Backups/mymachine.sparsebundle I see the bands directory like you do and it’s useless.

But if I mount mymachine.sparsebundle such that I can go to /Volumes/Time Machine Backups (that’s what it mounts as automatically in Finder when I double click on the mymachine.sparsebundle) I see the expected Backups.backupdb directory and under that the date-time directories as expected.

Answered by Ian C.