panthema / 2009 / digup / digup-0.6.40 / src / digup.1 (Download File)
.\" $Id: digup.1 40 2011-01-30 18:11:17Z tb $
.TH "digup" "1" "0.6" "Timo Bingmann" "User Commands"
.SH "NAME"
.LP
digup \- \fBDig\fPest file \fBup\fPdating program.
.SH "SYNOPSIS"
.LP
digup [\fIOPTIONS\fP]
.SH "DESCRIPTION"
.LP
digup is a tool to update md5sum or shasum digest files. It will read existing digest files, check the current directory for new, updated, modified, renamed or deleted files and query the user with a summary of changes. After reviewing the updates, they can be written back to the digest file.

One of the envisioned applications of digup is to update and verify incremental archives like chronological data storages or music collections. By using digup possibly undesired changes or lost files can easily be detected while quickly adding new files.

Another purpose could be to automatically verify the integrity of hard disk copies of archives, as backups to hard disks are becoming increasingly popular. Using a full file digest scan even slowly creeping bad blocks on old hard disks can be detected. By using a crontab entry, this check can be performed unattended and routinely.

In normal operation only touched files with newer modification times are fully read and their digest compared. Optionally a full scan can be performed to test all file contents against their expected digests.

Symbolic links are supported by either following the link and reading the target's digest or by saving only the link target path and verifying it against the old one.

The digest files written by digup are compatible with those generated and read by md5sum and similar programs from the coreutils package. Additional information like file size and modification time or symlink targets are stored on comment lines.

Four digest algorithms are supported: MD5, SHA1, SHA256 and SHA512. The digest file itself is also checksummed using CRC32 against unintentional changes. A fast red-black binary tree is used for the internal file list, allowing fast operation on a large number of files.
.SH "OPTIONS"
.LP
.TP
\fB\-b\fR, \fB\-\-batch\fR
Enable non-interactive batch processing mode as needed when run unattended e.g. from cron. This option also decreases verbosity by one level (--quiet). The returned error code is set to 1 if any changed, renamed, moved, deleted files or read errors occur.
.TP
\fB\-c\fR, \fB\-\-check\fR
Perform a full digest scan of all file contents, thus ignoring file modification times. Without this option files with equal size and modification time are skipped.
.TP
\fB\-d\fR, \fB\-\-directory\fR=\fI<path>\fR
Change into this directory before looking for digest files or performing a recursive scan.
.TP
\fB\-\-exclude\-marker\fR=\fI<file>\fR
Sets a marker file, often called ".nobackup" in other programs. If this marker file is found in a directory, the directory itself and all sub-directories are excluded from the digest scan.

This option is persistent. It is saved in the digest file and will be applied to all future scans performed to check or update digests.
.TP
\fB\-f\fR, \fB\-\-file\fR=\fI<file>\fR
Check this file for existing digests and write updates to it. Depending on the selected digest --type the following file names are used by default: "md5sum.txt", "sha1sum.txt", "sha256sum.txt" or "sha512sum.txt".
.TP
\fB\-l\fR, \fB\-\-links\fR
When this flag is enabled, symbolic links (if supported on the platform) are followed. Otherwise, by default, only the symbolic link's target path is saved and verified.
.TP
\fB\-m\fR, \fB\-\-modified\fR
Print only modified, changed, copied, renamed or deleted files. Unchanged files lines are suppressed. If the whole digest file is clean, then no summary output is printed at all. This option is useful for crontabs in combination with --batch.
.TP
\fB\-\-modify\-window\fR=\fI<integer>\fI
Consider modification time deltas of up to this value to be unchanged (the default is zero). This option is very useful for checking backups on FAT filesystems, as FAT stores modification times with a precision of only 2 seconds.
.TP
\fB\-q\fR, \fB\-\-quiet\fR
Reduces the level of verbosity by one.
.TP
\fB\-r\fR, \fB\-\-restrict\fR=\fI<substring>\fR
Restricts the digest check to filepaths containing the given substring pattern, other files are skipped. Does NOT imply -c / --check; specify it additionally to run a full digest check of specific files.
.TP
\fB\-t\fR, \fB\-\-type\fR=\fI<digest-type>\fR
Select the digest type for newly created digest files. This is not needed for updating existing one, as the type can inferred from the digest length.

digest-type must be md5, sha1, sha256 or sha512. The default digest type is sha1.
.TP
\fB\-u\fR, \fB\-\-update\fR
Automatically update the digest file in batch mode. Requires --batch, which is not automatically activated by this option.
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Increase the level of verbosity by one.

At level 0 only read errors are printed.

At level 1 the status of each processed file is printed.

And at level 2 (the default) additionally a progress indicator is printed while reading each file (one dot per megabyte).
.TP
\fB\-w\fR, \fB\-\-windows\fR
Ignores modification time deltas of just 1 second (equivalent to --modify-window=1). Useful for checking backups on FAT filesystems.
.SH "EXAMPLES"
.TP
To update or create a SHA1 digest file in current directory just run plain
digup
.TP
Alternatively update or create a SHA512 digest file in /mnt/disk1
digup -t sha512 -d /mnt/disk1/archive
.TP
A common call for a crontab line is
digup -bmd /mnt/disk1/archive
.TP
To run a full scan every midnight add a line similar to the following to your crontab
0 * * * *       digup -bcmd /mnt/disk1/archive
.SH "AUTHORS"
.LP
Timo Bingmann (tb (at) idlebox <dot> net)
.SH "SEE ALSO"
.LP
md5sum(1), sha1sum(1), sha256sum(1), sha512sum(1)

\"  LocalWords:  storages coreutils digup symlink filesystems crontab
RSS 2.0 Weblog Feed Atom 1.0 Weblog Feed Valid XHTML 1.1 Valid CSS (2.1)
Copyright 2005-2014 Timo Bingmann - Impressum