[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A caution for macOS users
macOS has things known as packages and bundles. At the filesystem level,
they're just directories, but at the Finder level they look like files.
Applications are both packages and bundles, and some applications write
data files that are one of the two (for example, Quicken's data files
and sparse bundle disk images are packages, etc.)
Packages and bundles should be considered atomic. Applications consist
of numerous files--the actual executable code, localized strings, page
layouts, etc.--and reasonably expect all that stuff to be there.
Similarly, if an application stores its data files as a package, it
would expect the various files in the package to be present, and if
they're not some data may be lost or the file might not even be openable.
How this applies to tarsnap is that tarsnap is looking at the file
system, so packages and bundles are just directories, and it would be
easy to accidentally exclude some file or directory in a package that
renders the package useless upon restore. If you're not specifying any
excludes, it won't be a problem, but if you are excluding some files or
directories, it wouldn't hurt to turn on -v and make sure everything in
any packages you're backing up is being backed up.
While it's arguably a bug in tarsnap that this can happen--tarsnap's job
is to back things up that can then be fully restored--it's also not
trivial to fix in a reasonable way, for example as far as I know the
only way to determine if a directory is a package is to query the
metadata database, and while there's a command line tool to do this
(mdls), running a command on (most) every directory would be expensive.