Back in April, 2007,
Nathaniel Gray introduced Backup Bouncer, a suite of tests that can be used to evaluate a backup solution's ability to preserve HFS+ filesystem metadata. Since then, I have discovered a few bugs in the test suite that would prevent it from accurately reporting results on various platform:OS combinations. I also identified some areas where Backup Bouncer could do a bit more, so I fleshed out some of the tests to be a bit more thorough. Finally, I also added support for testing the support of HFS+ filesystem compression, a feature added in Snow Leopard. See also this report of the
Backup Bouncer results for Carbon Copy Cloner.
I have highlighted my enhancements below, a link to the distribution is available at the bottom of the page.
Enhanced tests
Locked files
Applications that copy files tend to set the "locked" flag later in the copy process to avoid errors copying other attributes of the file. As such, I find it important to test the "locked" flag in addition to other tests in certain cases.
Finder flags
• I added a test for files with many flags and the "locked" flag.
• BUG FIX: The type and creator Finder Info should only tested if the target item is a file.
• BUG FIX: The test against directories was never valid because the create() function created a file named "mucho-flags-dir" rather than making a directory.
Extended attributes
• I replaced xattr-util altogether. I encountered too many crashes on various platforms that I decided replacing it with a known-good alternative was probably a better way to go. The attached binary is a 32-bit Universal binary that is compatible with Tiger, Leopard, and Snow Leopard. It exposes the HFS+ compression extended attributes by default, making it easier to validate files that should retain those attributes.
• I added a test for locked files that have extended attributes.
• I added tests to compare creation time and modification time of files/directories with extended attributes.
Access Control Lists
• I added a test for locked files that have access control entries.
• I added tests for inherited and non-inherited ACLs.
New tests
HFS+ Compression
This is certainly the most comprehensive test in the entire Backup Bouncer suite. My HFS+ Compression test validates the following:
• That the FS compression extended attributes are preserved (as well as any other extended attributes)
• That the compression flag is set
• That creation and modification dates match
• That hard links are preserved (for compressed files that are also hard links)
• That the file contents match (regardless of compression state)
• That a compressed file is properly truncated (that is, that there is no data in the data fork -- if a file had been previously copied as decompressed data, then copied by a tool that supports HFS+ compression, the data fork should be truncated)