Annotation of embedaddon/rsync/rsyncdb.1, revision 1.1

1.1     ! misho       1: .TH "rsyncdb" "1" "06 Aug 2020" "rsyncdb 3.2.3" "User Commands"
        !             2: .P
        !             3: .SH "NAME"
        !             4: .P
        !             5: rsyncdb \- Maintain an rsync checksum DB
        !             6: .P
        !             7: .SH "SYNOPSIS"
        !             8: .P
        !             9: .nf
        !            10: rsyncdb --db=CONFIG [OPTION...] [DIR...]
        !            11: .fi
        !            12: .P
        !            13: .SH "DESCRIPTION"
        !            14: .P
        !            15: Rsyncdb can maintain a checksum-caching DB that rsync can use to make its
        !            16: \fB\-\-checksum\fP option more optimal.  You must specify a config file via
        !            17: the \fB\-\-db=CONFIG_FILE\fP option in order for rsyncdb to know what DB to
        !            18: manipulate.  See the rsync manpage's \fB\-\-db\fP option for full details on
        !            19: the file's format.
        !            20: .P
        !            21: You can specify one or more directory args for rsyncdb to scan.  If no
        !            22: DIR args are specified, the current directory is assumed to be the spot
        !            23: to start scanning.
        !            24: .P
        !            25: Note that the rsyncdb program is usually just a symlink to the rsync program.
        !            26: You can force rsync to behave as rsyncdb either by having a symlink (or
        !            27: hardlink) name that ends with "db" or by \fBstarting\fP the rsync args with
        !            28: \fB\-\-db-only=CONFIG\fP (and that option works just like \fB\-\-db=CONFIG\fP to
        !            29: a program named rsyncdb).
        !            30: .P
        !            31: .SH "EXAMPLES"
        !            32: .P
        !            33: The following command will update checksum information in the database
        !            34: described in the /etc/db.conf file:
        !            35: .RS 4
        !            36: .P
        !            37: .nf
        !            38: rsyncdb --db=/etc/db.conf -o n --clean /dir1 /dir2
        !            39: .fi
        !            40: .RE
        !            41: .P
        !            42: It scans 2 directory hierarchies (/dir1 & /dir2) and cleans out any
        !            43: checksums whose inodes are no longer found in those directories (so that
        !            44: directory args are presumed to be complete for this host's DB contents).
        !            45: .P
        !            46: The following command will scan all the files in the /dir2 directory (without
        !            47: recursive scanning, due to the \fB\-\-no-r\fP option) and check them against
        !            48: the DB:
        !            49: .RS 4
        !            50: .P
        !            51: .nf
        !            52: rsyncdb --db=/etc/db.conf --check --no-r /dir2
        !            53: .fi
        !            54: .RE
        !            55: .P
        !            56: Any errors found are output as well as being fixed in the DB.  (See
        !            57: \fB\-\-no-update\fP for how to check without updating.)
        !            58: .P
        !            59: The following command will output MD5 sums for all the files found in the
        !            60: directories mentioned, even if they are unchanged (due to the
        !            61: \fB\-\-output=us\fP option):
        !            62: .RS 4
        !            63: .P
        !            64: .nf
        !            65: rsyncdb --db=/etc/db.conf -rous /dir* >/tmp/md5sums.txt
        !            66: .fi
        !            67: .RE
        !            68: .P
        !            69: This is just like running md5sum, only faster.  Unlike md5sum, you can't
        !            70: specify a single file, so use \fB\-\-no-r\fP and grep the output if you just
        !            71: want to see a single file's value.
        !            72: .P
        !            73: The following command initializes a new DB, and is required for any new DB:
        !            74: .RS 4
        !            75: .P
        !            76: .nf
        !            77: rsyncdb --db=/etc/db.conf --init --mounts
        !            78: .fi
        !            79: .RE
        !            80: .P
        !            81: The \fB\-\-init\fP option should only be used once (unless you want to
        !            82: destroy existing data).  The \fB\-\-mounts\fP option may need to be used
        !            83: periodically, and makes use of a helper script (see below).
        !            84: .P
        !            85: .SH "OPTIONS SUMMARY"
        !            86: .P
        !            87: Rsyncdb accepts the following options:
        !            88: .P
        !            89: .nf
        !            90: --db=CONFIG       Specify the CONFIG file to read for the DB info
        !            91: --db-lax          Ignore ctime changes (use with CAUTION)
        !            92: --recursive, -r   Scan files in subdirs (the default w/o --no-recursive)
        !            93: --sums=SUMS, -s   List which checksums to update (default: 4,5)
        !            94: --output=STR, -o  One or more letters of what to output (default: "")
        !            95: --check, -c       Check checksums (by reading the files) and fix any
        !            96:                   issues.  Makes --output default to "dni".
        !            97: --clean           Note all inodes in the DIRS and remove DB extras
        !            98: --no-update, -N   Avoids updating/adding info w/--check and/or --clean
        !            99: --init            Initialize a DB by (re-)creating its tables
        !           100: --mounts          Scan for mounted filesystems and update the DB
        !           101: --quiet, -q       Disable the default non-error output
        !           102: --help, -h        Display this help message
        !           103: .fi
        !           104: .P
        !           105: .SH "OPTIONS"
        !           106: .P
        !           107: Rsyncdb accepts both long (double-dash + word) and short (single-dash + letter)
        !           108: options.  The full list of the available options are described below.  If an
        !           109: option can be specified in more than one way, the choices are comma-separated.
        !           110: Some options only have a long variant, not a short.  If the option takes a
        !           111: parameter, the parameter is only listed after the long variant, even though it
        !           112: must also be specified for the short.  When specifying a parameter, you can
        !           113: either use the form \-\-option=param or replace the '=' with whitespace.  The
        !           114: parameter may need to be quoted in some manner for it to survive the shell's
        !           115: command-line parsing.
        !           116: .P
        !           117: .IP "\fB\-\-db=CONFIG_FILE\fP"
        !           118: This tells rsyncdb what DB-config file to read for the DB setup.  This is
        !           119: the same as the option in rsync, so refer to that manpage for full details.
        !           120: .IP "\fB\-\-db-lax\fP"
        !           121: This option works just like it does in rsync, so refer to that manpage for
        !           122: full details.
        !           123: .IP "\fB\-\-no-recursive,\ \-\-no-r\fP"
        !           124: This disables the default recursive directory scan that is performed on the
        !           125: listed directory args.  The options \fB\-\-recursive\fP and \fB\-r\fP are also
        !           126: accepted, if someone wants to override an earlier \fB\-\-no-r\fP override.
        !           127: .IP "\fB\-\-sums=SUMS,\ \-s\fP"
        !           128: Only output/update the listed checksum types. By default we deal with just
        !           129: the newer md5 checksums (i.e.  \fB\-\-sums=5\fP).
        !           130: .IP
        !           131: Note that this option does NOT affect the order that checksums are output
        !           132: if "\-o s" is enabled, so \fB\-s5,4\fP is the same as \fB\-s4,5\fP.
        !           133: .IP "\fB\-\-output=STR,\ \-o\fP"
        !           134: The output option lets you specify one or more letters indicating what
        !           135: information should be output.  If \fB\-\-output\fP is not specified, the default
        !           136: is either "dn" or (with \fB\-\-check\fP) "dni".
        !           137: .IP
        !           138: The following letters are accepted in the string:
        !           139: .IP
        !           140: .RS
        !           141: .IP o
        !           142: \fBd\fP outputs "... dir_name ..." lines for each directory in our scan.  if
        !           143: "d" is omitted, then this progress indictor is not output.
        !           144: .IP o
        !           145: \fBn\fP includes the file's name in the per-file output. These lines are only
        !           146: output for changed files unless "u" is given.  The "n" option is implied
        !           147: by every other output option letter except "d".
        !           148: .IP o
        !           149: \fBs\fP includes the checksum info in the per-file output.
        !           150: .IP o
        !           151: \fBc\fP is a synonym for 's'.
        !           152: .IP o
        !           153: .IP
        !           154: .RS
        !           155: .IP o
        !           156: \fBi\fP includes itemized change info in the per-file output.
        !           157: 
        !           158: \fB!i\fP indicates that the time and/or size is wrong.
        !           159: .IP o
        !           160: \fB+4\fP indicates the MD4 sum is missing.
        !           161: .IP o
        !           162: \fB+5\fP indicates the MD5 sum is missing.
        !           163: .IP o
        !           164: \fB!4\fP indicates the MD4 sum is wrong.
        !           165: .IP o
        !           166: \fB!5\fP indicates the MD5 sum is wrong.
        !           167: .IP o
        !           168: \fB?4\fP indicates an unknown MD4 difference.  This can happen if we didn't
        !           169: need to read the file; i.e. if the time/size is wrong and no sum info
        !           170: was requested.
        !           171: .IP o
        !           172: \fB?5\fP indicates an unknown MD5 difference.
        !           173: .RE
        !           174: .IP o
        !           175: \fBu\fP includes unchanged files in the per-file output lines.
        !           176: .RE
        !           177: .IP "\fB\-\-check,\ \-c\fP"
        !           178: Check the checksums (forcing the reading of all the files) and fix any
        !           179: issues that are found.  Makes \fB\-\-output\fP default to "dni".
        !           180: .IP "\fB\-\-clean\fP"
        !           181: Makes a temp-DB of all the inodes that we find in all the listed
        !           182: directories and removes any extraneous checksums from the DB.  You will
        !           183: need to specify all the mounted directories that are present (and listed as
        !           184: mounted) in the DB on this host or else the checksums from the unvisited
        !           185: directories will be discarded from the DB.  If you want to just \-\-clean
        !           186: without adding or updating the info of new or changed files, specify
        !           187: \fB\-\-no-update\fP as well.
        !           188: .IP "\fB\-\-no-update,\ \-N\fP"
        !           189: Avoids updating/adding info with \fB\-\-check\fP and/or \fB\-\-clean\fP.
        !           190: .IP "\fB\-\-quiet,\ \-q\fP"
        !           191: Disable the default (non-error) output settings.  This turns off the
        !           192: messages that \fB\-\-init\fP, \fB\-\-mount\fP, and \fB\-\-clean\fP output, and makes the
        !           193: default for \fB\-\-output\fP be nothing (though an explicit \fB\-\-output\fP option is
        !           194: not affected).
        !           195: .IP "\fB\-\-init\fP"
        !           196: Create the tables in the DB.  If it is used on an existing DB, all the
        !           197: existing tables are dropped and re-created.
        !           198: .P
        !           199: This option cannot be combined with the updating or reporting of checksum
        !           200: information, but may be combined with \fB\-\-mounts\fP.
        !           201: .P
        !           202: .IP "\fB\-\-mounts\fP"
        !           203: Populate the "disk" DB with the available device numbers and change any
        !           204: mounted/unmount information for devices.  This should be run every time a
        !           205: mount-change happens that may affect a directory hierarchy in the DB.
        !           206: Rsyncdb will not save any checksums for a device that is not listed in the
        !           207: "disk" table.
        !           208: .IP
        !           209: The helper script "rsyncdb-mountinfo" is used as the source of the mount
        !           210: information on the host, which it derives from various system files and
        !           211: UUID directories (if available).  That script supports the use of an
        !           212: override file named ".rsyncdb_mount_uniq" in the root of the mount as one
        !           213: way to manually assign unique values to a shared (mountable) device's
        !           214: various disks.
        !           215: .IP
        !           216: Some advanced users may want to maintain the disk table themselves in order
        !           217: to support mounting a drive in different (or multiple) locations, etc.
        !           218: .IP
        !           219: Specifying the \fB\-\-mounts\fP option cannot be combined with updating or
        !           220: reporting of checksum information, but may be combined with \fB\-\-init\fP.
        !           221: .IP "\fB\-\-help,\ \-h\fP"
        !           222: Display a summary of the options.
        !           223: .P
        !           224: .SH "SEE ALSO"
        !           225: .P
        !           226: \fBrsync\fP(1)
        !           227: .P
        !           228: .SH "AUTHOR"
        !           229: .P
        !           230: Rsyncdb was written by Wayne Davison.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>