tar: verify
1
1 9.8 Verifying Data as It is Stored
1 ==================================
1
1 '-W'
1 '--verify'
1 Attempt to verify the archive after writing.
1
1 This option causes 'tar' to verify the archive after writing it.
1 Each volume is checked after it is written, and any discrepancies are
1 recorded on the standard error output.
1
1 Verification requires that the archive be on a back-space-able
1 medium. This means pipes, some cartridge tape drives, and some other
1 devices cannot be verified.
1
1 You can insure the accuracy of an archive by comparing files in the
1 system with archive members. 'tar' can compare an archive to the file
1 system as the archive is being written, to verify a write operation, or
1 can compare a previously written archive, to insure that it is up to
1 date.
1
1 To check for discrepancies in an archive immediately after it is
1 written, use the '--verify' ('-W') option in conjunction with the
1 '--create' operation. When this option is specified, 'tar' checks
1 archive members against their counterparts in the file system, and
1 reports discrepancies on the standard error.
1
1 To verify an archive, you must be able to read it from before the end
1 of the last written entry. This option is useful for detecting data
1 errors on some tapes. Archives written to pipes, some cartridge tape
1 drives, and some other devices cannot be verified.
1
1 One can explicitly compare an already made archive with the file
1 system by using the '--compare' ('--diff', '-d') option, instead of
1 using the more automatic '--verify' option. ⇒compare.
1
1 Note that these two options have a slightly different intent. The
1 '--compare' option checks how identical are the logical contents of some
1 archive with what is on your disks, while the '--verify' option is
1 really for checking if the physical contents agree and if the recording
1 media itself is of dependable quality. So, for the '--verify'
1 operation, 'tar' tries to defeat all in-memory cache pertaining to the
1 archive, while it lets the speed optimization undisturbed for the
1 '--compare' option. If you nevertheless use '--compare' for media
1 verification, you may have to defeat the in-memory cache yourself, maybe
1 by opening and reclosing the door latch of your recording unit, forcing
1 some doubt in your operating system about the fact this is really the
1 same volume as the one just written or read.
1
1 The '--verify' option would not be necessary if drivers were indeed
1 able to detect dependably all write failures. This sometimes require
1 many magnetic heads, some able to read after the writes occurred. One
1 would not say that drivers unable to detect all cases are necessarily
1 flawed, as long as programming is concerned.
1
1 The '--verify' ('-W') option will not work in conjunction with the
1 '--multi-volume' ('-M') option or the '--append' ('-r'), '--update'
1 ('-u') and '--delete' operations. ⇒Operations, for more
1 information on these operations.
1
11 Also, since 'tar' normally strips leading '/' from file names (⇒
absolute), a command like 'tar --verify -cf /tmp/foo.tar /etc' will
1 work as desired only if the working directory is '/', as 'tar' uses the
1 archive's relative member names (e.g., 'etc/motd') when verifying the
1 archive.
1