Aperture, OS X 10.5.2 and Time Machine

Scott Lewis sglewis at mac.com
Wed Feb 27 17:44:38 PST 2008


On Feb 27, 2008, at 8:10 AM, Mark Smith wrote:
>> From memory, it was cited as a 10.5.2 feature and IIRC it predated  
>> Aperture 2's release as this indirectly confirms:

Yup, had to be a 10.5.2 feature, since the support is also for  
Aperture 1.5 as well.

I'm awfully confused (and concerned) by the behavior.  This will be  
hard to explain without pasting screen shots, but I don't want to do  
that on the list. :)

I initially said that Aperture seemed to back up once daily. I take  
that back. I have an Aperture Library.aplibrary directory in most (but  
not all) of my recent Time Machine backups, when examining the folder  
structure from Terminal. Oddly, there's nothing from 2-25, but I have  
from 2-23, 2-24, TWO from 2-26, and one an hour from today. Viewing  
the same folder from the Time Machine GUI (the one where my Aperture  
Library sits), I NOW see the same... although I vividly remember a  
different behavior earlier today and all day yesterday - perhaps the  
fact that I had Aperture open over the last several days, but closed  
it down recently?

So it now appears that Time Machine does backup the Aperture library  
every hour, the question is how much space it uses. It's my  
understanding that doing an 'ls' from terminal, or viewing info from  
Finder will not give an accurate info, as hard links will report used  
space, unlike symlinks, so if I have four directories and each  
contains a hard link to a 1gb file, each will read the file as taking  
1gb, which would make a normal person think 4gb in use, but in reality  
it's still just 1gb. For those who haven't just done all the google  
reading I had to do, that's because each file in UNIX file systems has  
a unique (to the filesystem itself, that is) inode number, and a hard  
link is merely an entry in a directory with that same inode, so you  
can have a file residing in multiple directories, for example, but not  
taking up any extra space, since they aren't copies, but just links.

 From what I read, it appears that when doing a ls -l from terminal  
you can see how many file entries link to an inode.

So taking a set of Aperture imported pictures I did a few days ago  
(Sunday night or Monday night, I forget when I finally stopped editing  
the pictures in Aperture and published a small subset of them to my  
website), I see the following in terminal, which requires a brief  
explanation of how Aperture stores files, for those unfamiliar with it.

Inside the Aperture Library directory there is a directory for each  
"project" you create, and in there is a series of directories for any  
photo imports you've done. In the project I'm referring to, called  
"SeaWorld Feb 2008", I have pictures from a trip to (go figure)  
SeaWorld we took this weekend. I had shot pics and stored them onto my  
laptop at the hotel, and grouped them by day (Friday, Saturday,  
Sunday). When I imported them to Aperture, I did it day by day into  
folders, so I have three folders among the many inside this project:

drwxr-xr-x+ 336 scott  staff      11424 Feb 24 21:09 2008-02-24 @  
09:03:10 PM - 1.apimportgroup
drwxr-xr-x+  17 scott  staff        578 Feb 24 21:48 2008-02-24 @  
09:48:19 PM - 2.apimportgroup
drwxr-xr-x+ 229 scott  staff       7786 Feb 24 21:51 2008-02-24 @  
09:48:47 PM - 3.apimportgroup

So, according to that, there are 336 hard links (well, 335 I guess  
since one is I guess the original file itself) to the first folder???  
That seems awfully high, although the second number (17) sounds about  
right.

Inside there are folders for each of the pictures imported, so for a  
photo entitled DSC01772 there's a folder of the same name, and EACH of  
those have:

drwxr-xr-x+ 9 scott  staff  306 Feb 26 07:28 DSC01772

Seemingly 9 links? Inside that folder, however, I see the following:

-rw-r--r--+ 1 scott  staff  9696228 Feb 24 11:49 DSC01772.JPG
-rw-r--r--+ 1 scott  staff     1058 Feb 24 21:07 DSC01772.JPG.apfile
-rw-r--r--+ 1 scott  staff      547 Feb 24 21:07 Info.apmaster
-rw-r--r--+ 1 scott  staff     3751 Feb 24 21:05  
OriginalVersionInfo.apversion
drwxr-xr-x+ 3 scott  staff      102 Feb 24 21:16 Previews
drwxr-xr-x+ 3 scott  staff      102 Feb 24 21:16 Thumbnails
-rw-r--r--+ 1 scott  staff     4168 Feb 26 07:28 Version-1.apversion


Does that mean that DSC01772.JPG, an almost 10gb file is taking up  
almost 10gb in each of the Time Machine backups, since it's not linked  
to more than once? Or does it mean that because the PARENT folder is  
linked it's impossible for me to tell?

Someone help, I seem lost in the concept of hard links. I will say  
that based on the fact that I have some free space left on this drive  
(it's 1tb, but as you can see I have a LOT of data (some 400gb so far)  
that it seems that those JPGs aren't stored more than once - which  
would make sense - Aperture NEVER changes the original file.

I guess basically, I'm hoping a file system expert can provide a clear  
tutorial of how these hard links work, and even better, provide a way  
to estimate how much space a particular time machine backup occupies,  
ie it represents 400gb of backups but since it was incremental, it's  
only using 20gb of space and the rest are hard links. How on earth can  
you tell?

Sorry guys - I know this is a long post.







More information about the MacOSX-talk mailing list