ArGest Backup User Guide

  1. Home
  2. Docs
  3. ArGest Backup User Guide
  4. Terminal Archive Inspection and Verification
  5. Archive Verification – Reporting File Differences: (-d)

Archive Verification – Reporting File Differences: (-d)

If the -d (differences) option is included on the BRU command line, BRU compares the archive (tape) file with the corresponding file on the disk. If any differences are found, they will be reported and the information will be written to stdout. The amount of information reported is determined by the difference level (the number of -d options) and the verbosity level (number of -v options). NOTE: The -d option will read the archive first, and then compare it with the corresponding file on disk. If there is no corresponding file on the disk, BRU issues a warning message. If the disk file differs from the archived file, BRU reports the difference.

If there are disk files that are not on the archive tape, BRU is not aware of the files and no messages will be generated. Differences will be reported only for files that exist on the archive tape.

BRU counts the number of files that are different and lists the count in the execution summary. If there are no differences, the count will be zero. Also, if any differences are found, the exit code returned by BRU will be set to 1.

You can use the -d option when you create an archive:

bru -c -d

Or you can use it alone, to check which files have changed since the archive was created:

bru -d

Using the -d option causes BRU to report whether a file has changed either its size or its contents. BRU compares the file and the archive as byte-streams, that is, it treats both files as a stream of characters and reports any difference between the two.

Like -v, -d allows you to specify levels of difference checking. If you call BRU with the -dd option, in addition to comparing the files and the archive as byte streams, BRU reports the following:

  • Differences in the file modification date (mtime)
  • Changes in the access mode (chmod has been used on the file)
  • Changes in the number of links for non-directory files
  • Differences in the contents of symbolic links
  • Differences in the owner identification (chown has been used on the file
  • Differences in group ID (chgrp has been used on the file)
  • When you specify the option as -ddd, BRU also reports

  • Differences in host device
  • Differences in major/minor device for special files
  • Time of last access for regular files
  • If the option is specified as -dddd, BRU reports all other differences except for the time of the last status change, major/minor device numbers for non-special files, and size differences for directory files (there may be empty directories).

    The -dddd mode is generally meaningful only during a verification pass of a full backup on a filesystem that no users are currently accessing (that is, no files are being created or modified).