SUMMARY
Corrupt header causes restore to abort with ..Directory no in proper format.
ISSUE
Purpose
This article is to provide information why a restore may be incomplete due to a corrupt header.
Symptoms
The restore receives a success. But after further investigation, it is found that only a few files were restored.
Restore logs show the following:...Directory not in proper format Length...
Resolution
There is unfortunately no resolution. However, to prevent backups with bad headers, you may want to use inline verification.
The developers notes are listed below. Also, if you want to verify that the files currently on the client are not corrupt, you
can do a quick backup and verify it with the additional instructions below.
Developer's Notes:
“ One factor here is the type of verification used when the job is run. Both
file-level and bit-level verification check whether the backup received by the
DPU match what was sent by the agent.
Inline verification adds an additional level of checking, where it ensures that
the backup file is not malformed with respect to the file headers within the
backup, as well as their sizes and locations. It essentially makes sure that
the files are restorable, and is better at identifying this type of corruption
than the other methods.”
To VERIFY YOUR BACKUP:
We have a tool that will read through the backup and print each CTAR file header as well as the file sizes and offsets. If that tool finds a bad header, it’ll print the message “Not a Tar header!!”, and we can use this information to figure out what went wrong. Typically, the problems are:
a. Bad CTAR header checksum (so the current header is bad)
b. Bad file size/offset in the prior header (so the current offset isn’t even a CTAR header; we’re “lost” in the file)
To run this on a backup on our DPU, sending the output to a file for later analysis, you can do this:
/usr/bp/bin/fileDedup -R<backup #> | /usr/bp/bin/scantar - > /tmp/scantar.out
Then, you can ship /tmp/scantar.out somewhere or just look at it in-place, specifically searching for the “Not a Tar header!!” message that will tell us where the problems are.”