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

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

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