Compare a list of files or directories with data stored in a backup directory. $ hb compare [-c backupdir] [-v level] [-f] [-i attr1,attr2,...] -X [--sample p] pathname [pathname ...] Displays files and directories that have been added, changed, or removed since the most recent backup. New files are marked with +, removed files are marked with -, and changed files are marked with !. For changed files, the changes are listed after the pathname. -v control how much output is displayed, higher numbers for more:
-i ignore certain attributes (separated by commas, no spaces); attribute values are: ctime,gid,ino,mode,mtime,nlink,rdev,size,uid -X cross mount points (descend into other filesystems) --sample p specifies a percentage from 1 to 100 of files to sample for inclusion in the backup. This is a percentage of the files seen, not a percentage of the data in the files. This option only makes sense if the backup was created with the same sample percentage. Examples Example with no changes: # hb compare -c /hb /System HashBackup build 801 Copyright 2009-2012 HashBackup, LLC Backup directory: /hb This is backup version: 0 No files changed No errors # Example with changes: # hb compare -c /hb /Library HashBackup build 801 Copyright 2009-2012 HashBackup, LLC Backup directory: /hb This is backup version: 0 ! /Library/Keychains (mtime,ctime) ! /Library/Preferences (mtime,ctime) ! /Library/Preferences/com.apple.SoftwareUpdate.plist (ino,mtime,ctime) ! /Library/Printers (mtime,ctime) ! /Library/Printers/InstalledPrinters.plist (ino,size,mtime,ctime) ! /Library/Updates (mtime,ctime) ! /Library/Updates/ProductMetadata.plist (ino,mtime,ctime) 7 files changed No errors # The same example, ignoring some attributes: # hb compare -c /hb /Library -i mtime,ctime HashBackup build 801 Copyright 2009-2012 HashBackup, LLC Backup directory: /hb This is backup version: 0 ! /Library/Preferences/com.apple.SoftwareUpdate.plist (ino) ! /Library/Printers/InstalledPrinters.plist (ino,size) ! /Library/Updates/ProductMetadata.plist (ino) 3 files changed No errors # Example showing new, changed, and removed files: sh-3.2# hb compare -c /hb /private/etc HashBackup build 801 Copyright 2009-2012 HashBackup, LLC Backup directory: /hb This is backup version: 0 ! /private/etc (mtime,ctime) ! /private/etc/cups/certs (mtime,ctime) ! /private/etc/cups/certs/0 (ino,mtime,ctime) ! /private/etc/dnscache/log/main (mtime,ctime) - /private/etc/dnscache/log/main/@4000000050c2a0560119f98c.s - /private/etc/dnscache/log/main/@4000000050c2a0fb0e988ca4.s + /private/etc/dnscache/log/main/@4000000050c36a0a169fd4fc.s + /private/etc/dnscache/log/main/@4000000050c36a0e34b4ddd4.s + /private/etc/dnscache/log/main/@4000000050c36aa1297cc7ec.s ! /private/etc/dnscache/log/main/current (ino,size,mtime,ctime) ! /private/etc/hosts (ino,size,mtime,ctime) - /private/etc/hosts.~24~ + /private/etc/hosts.~26~ 26 files changed No errors Notes
|
Commands >