NO RESPONSABILITY WILL BE TAKEN FOR ANY KIND OF DAMEGE MADE BY THESE PROGRAMS
This is an Alpha version
Plese report to me bugs (but also successes) at the e-mail address
claudio@claudiofanelli.it.
Usage:
createecc <input_file>
correct c <input_file> <output_file>
CreateEcc creates a file (named <input_file.ecc)
with the error correction codes (ECC) of
. In this way if
some corruption occur in the original file
occurs,
Correct can try to restore <input_file> to the state in
which it was when CreateEcc was called.
If you want to see createecc+correct in action easily (without having a currupted file), you can do the following:
# createecc index.html
# correct index.html index.html.original
If you have a backup archive (named for example backup.tgz), it is convenient that you create an ECC file:
# createecc backup.tgz
Now you can save backup.tgz and backup.tgz.ecc on CD-ROM, HD, or where do you want.
If backup.tgz is partially corrupted, you can run:
# correct backup.tgz backup.corrected.tgz
and, if the errors are gestible by correct,backup.corrected.tgz willcontain the original, corrected version of backup.tgz.
Note that is possible that backup.tgz is completally unreadable, even if it
has just few errors. So it is better split it in smaller chuncks with
split. The dimensions of these chunks should be 1/4 or 1/5 of the
dimension of the file .ecc
If for example such file has length of about 450k, you can use chunks of 100k:
#split -b 100k backup.tgz backup.tgz.
(more then 30-40 chunks are not needed, so if backup.tgz is bigger than 3 or 4 Mbyte you can split it in chunks bigger than 100k)
Now, if one of the chuncks is unreadable, you can recostruct a copy of
backup.tgz coping one of the other chuncks and the using
correct. For
example if backup.tgz.ao and backup.tgz.ba are unreadable,
you can do:
# cp /mnt/cdrom/backup.* /tmp/
(we suppose that backup.tgz.ao and backup.tgz.ba cannot be copied. But note that backup.tgz.ecc MUST be copied, or we cannot do nothing)
# cp /mnt/cdrom/backup.aa /tmp/backup.tgz.ao
# cp /mnt/cdrom/backup.aa /tmp/backup.tgz.ba
# cat /tmp/backup.tgz.* >/tmp/backup.tgz.corrupted
# correct backup.tgz.corrupted backup.tgz
Here you can find the statically linked executables for Linux i386 (17 KBytes)