n8gray / Backup-Bouncer

A metadata test suite for OS X backup tools
http://n8gray.org/code/backup-bouncer
Other
183 stars 16 forks source link

FYI: forked and allegedly improved copy #10

Open astrostl opened 11 years ago

astrostl commented 11 years ago

http://www.bombich.com/groups/ccc/wiki/7ba51/

Someone at Carbon Copy Cloner (its author?) has their own version. Perhaps the changes can/should be merged?

dukechem commented 5 years ago

Just providing some 2018-2019-era info for anyone who arrives here... ;-)

Bombich changes are said to be merged in rbb (2013 ruby version of backup bouncer) at https://github.com/lifepillar/RubyBackupBouncer The readme says it includes "modifications by Carbon Copy Cloner's author" (Steve Bombich is the famous author of Carbon Copy Cloner.)

NOTE: As of 2018, the bb here at this n8gray gitub site still works (with one patch for dumpbits) on 10.11 10.12 and 10.13 with hfs+ when running the shell script at http://www.hashbackup.com/technical/backup-bouncer. The shell script patches bb, and then shows hashbackup passes all the bb tests (if you run it with sudo). If you want to try it install you need hb in your path which this will do:

brew cask install hashbackup

BUT almost all macs with SSD and running macos of 10.13 or newer will use APFS instead of HFS+ filesystem, so be warned that bb/rbb will likely not work very well on APFS file systems. That is, on newer macs, bb or rbb are likely work only on hfs+ formatted items like fusion drives, mechanical hard-drives, time-machine destinations, disk-images, etc.

Finally, the op's bombich.com link http://www.bombich.com/groups/ccc/wiki/7ba51/ has been dead since 2013, but for the record, I copy and pasted the original posting below. It is a snapshot from 3/02/12 of text of dead bombich link from this site: http://houpelande3.rssing.com/chan-3275180/latest.php There is a fork here that has bombitch patches and other bug fixes: https://github.com/PenelopeFudd/Backup-Bouncer and it is one-commit ahead of this n8gray repo because pull request 4 was never merged.

03/02/12--07:03: Article 4 (below is last snapshot of Bombich post on his fixes to backup Bouncer)

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. Resource forks • Resource forks larger than 64MB have to be handled specially, the getxattr() system call will only read 64MB at a time. As a result, it's possible for some applications to completely miss anything past the 64MB mark (cough Finder in some circumstances, cough) 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, Snow Leopard, and Lion. 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. • BUG FIX: The order in which the xattrs are listed is not guaranteed to be identical across filesystems, so I sort the list before comparing to avoid false negatives. 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) Download my modified distribution of Backup Bouncer and test it against your favorite backup utility today. Does it preserve everything? I hope so!

jgrisham commented 2 years ago

Thanks for that!

By the way, here's:

Finally, a link to Mike Bombich's rsync page, which is referenced by some of the above pages but no longer is live (at least not at the same URL):