![]() |
ACV 0.3 - Asynchronous Copy and Verify |
If you use a streaming tape drive (such as a DAT drive or a Colorado Jumbo/Tracker) for backups, and it can swallow data much faster than the backup program (such as tar-gzip) can generate data, then you probably get the effect that the drive has to repeatedly stop and rewind, and then restart, each time that it runs out of data. In some cases, this means that the actual backup takes longer than the backup program itself requires, since the latter then blocks while the tape is rewinding and restarting. Exactly the same problem occurs when restoring.
ACV is a utility program intended to alleviate this problem. ACV copies data via a large internal buffer, such that
In addition, ACV can verify that the data was correctly written. It can checksum the data that it copies (using the algorithm used by the sum(1) utility), then re-read the output to calculate a second checksum, which is compared with the first. It can also handle the situation where the output device does not preserve the exact file length, so that there is trailing garbage in the backup.
As an example, the following is the ACV command from one of by backup scripts. It takes output from tar, and writes to the floppy tape device:
/usr/local/bin/acv -b8M -w10K -B -f -v -o/dev/ftape -C
This specifies an 8MByte buffer and writing in 10KByte blocks. The -B option forces all writes to be 10KBytes, to keep zftape happy, while the -f forks ACV to fork, getting around the problem that the floppy tape device does not do non-blocking writes (well, it didn't last time I looked!). The -C option checksums the data written, then re-reads it can verifies the checksum.
NOTE: ACV program is released under the GPL. The author accepts no responsibility for loss or corruption of data that results from the use of ACV. You are advised to verify backups by some other means before relying upon it (athough I do).
Click here to download the .tgz distribution.