The National Institute for Computational Sciences

HPSS (Darter and Nautilus): How do I verify the contents of an archive during creation?

HTAR provides the “-Hverify=option[,option...]” command line option, which causes HTAR to first create the archive file normally, and then to go back and check its work by performing a series of checks on the archive file. You choose the types of checks to be performed by specifying one or more comma-separated options. The options can be either individual items, or the keyword “all”, or a numeric level between 0, 1 or 2. Each numeric level includes all of the checks for lower-valued levels and adds additional checks. The verification options are:

all Enables all possible verification options except “paranoid”
info Reads and verifies the tar-format headers that precede each member file in the archive
crc Reads each member file and recalculates the Cyclic Redundancy Checksum (CRC), and verifies that it matches the value that is stored in the index file.
compare This option directs HTAR to compare each member file in the archive with the original local file.
paranoid This option is only meaningful if “-Hrmlocal” is specified, which causes HTAR to remove any local files or symbolic links that have been successfully copied to the archive file.

If “paranoid” is specified, then HTAR makes one last check before removing local files or symlinks to verify that:
a. For files, the modification time has not changed since the member file was copied into the archive
b. The object type has not changed, for example, if the original object was a file, it has not been deleted and recreated as a symlink or directory, etc.
It is also possible to specify a verification option such as “all”, or a numeric level, such as 0, 1 or 2, and then selectively disable one or more options. In practice, this is rarely, if ever, useful, but the following options are provided:
0 Same as “info”
1 Same as “info,crc”
2Same as “info,crc,compare”
nocompareDisables comparison of member files with their original local files
nocrc Disables CRC checking
noparanoidDisables checking of modification time and object type changes
htar -cvf TEST_VERIFY.TAR /lustre/medusa/$USER -Hcrc -Hverify=2
htar -Hcrc -tvf TEST_VERIFY.TAR
In the example above,
(1) the archive file is created (-c) with verification level 2, including CRC generation and checking. The verbose output option (-v) is used to cause HTAR to display information about each file that is added during the create phase, and then verified during the verification phase.
(2) the archive file is then listed (-t) using the "-Hcrc" option to cause HTAR to display the CRC value for each member file. />/>/>