storeBackupCheckSource.pl
If you copy data from one disk to another, you might have
unrecognized bit failures (e.g. in main memory, in the cpu, on the
transfer lines) resulting in wrong data stored in your backup. This
may happen especially over long time periods on the backup disk
itself. Because storeBackup also stores check sums in addition to the
real data it's possible to compare the stored data in the backup with
the check sums generated from the source files to give you a better
probability that your backup data is not broken. This is the reason,
why storeBackupCheckBackup.pl exists.
But such a bit error may also occur in your source data after a long period
of time. With this program, you can check files not changed since they were
backed up by comparing the check sum in the backup with the source
file.
storeBackupCheckSource.pl -s sourceDir -b singleBackupDir [-v]
[-w filePrefix]
[--logFile
[--plusLogStdout] [--suppressTime] [-m maxFilelen]
[[-n noOfOldFiles] | [--saveLogs]]
- --sourceDir / -s
- This must be the directory you specified as
parameter to option sourceDir to storeBackup.pl when
you were running your backup you want to compare with.
- --singleBackupDir / -b
- The backup directory you want to
use for the comparison. This must be one single backup
directory.
- --wrongFileTables / -w
- When using this option,
storeBackupCheckSource.pl will write two files beginning with
the prefix defined here. If you define this option e.g. as
/tmp/faults- then the files
/tmp/faults-md5sums.missing.txt and
/tmp/faults-md5sums.wrong.txt will be written. They
contain lines with the names of the files where the md5 sum is
missing or wrong (different18 to sourceDir) in the backup. These files are
written additionally to error messages and may be used easily to
further inspect or repair the backup.
In the files written a \
(backslash) is written with the
literals \5C
and a \n
(linefeed) with the literals
\0A
.
- --verbose / -v
- Verbose. Print additional information:
- always printed: ERROR message if the md5 sum differs
- always printed: WARNING if permissions, uid or gid differs
- printed with option -v only: MISSING if file is
not in the source directory
- printed with option -v only: INFO if file is
identical
- --logFile / -l
- Name of the log file. Default is stdout.
- --plusLogStdout / plusLogStdout
- If the option logFile is
set, you can here configure storeBackup.pl to print the log
messages to stdout, too.
- --suppressTime
- Suppress the output of the actual time in
the log file.
- --maxFilelen / -m
- Maximal size of a log file. After
reaching this size, the log file will be rotated (see option
noOfOldFiles) or compressed (see option saveLogs).
- --noOfOldFiles / -n
- Number of old rotated log files,
default is 5.
With default values, it will look like this:
$ ls -l /tmp/storebackup.log*
-rw------- 1 hjc root 328815 30. Aug 12:12 /tmp/storebackup.log
-rw------- 1 root root 1000087 27. Aug 21:18 /tmp/storebackup.log.1
-rw------- 1 root root 1000038 20. Aug 19:02 /tmp/storebackup.log.2
-rw------- 1 root root 1000094 11. Aug 18:51 /tmp/storebackup.log.3
-rw------- 1 root root 1000147 11. Aug 18:49 /tmp/storebackup.log.4
-rw------- 1 root root 1000030 11. Aug 18:49 /tmp/storebackup.log.5
Older log files than *.5 have been deleted automatically.
- --saveLogs
- Save the log files with a time and date stamp instead of deleting
them after rotating. (Setting this option overwrites the default
value of option noOfOldFiles.)
- --compressWith
- Specifies the program to
compress the saved log files (e.g., with gzip -9). Default
value is bzip2.
On the command line, the parameter for this option is parsed like a
line in the configuration file and normally has to be quoted.
Heinz-Josef Claes
2014-04-20