/usr/share/doc/bup/bup-index.html is in bup-doc 0.29-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<meta name="author" content="Avery Pennarun apenwarr@gmail.com" />
<meta name="date" content="2017-04-01" />
<title>bup-index(1) Bup debian/0.29-3</title>
<style type="text/css">code{white-space: pre;}</style>
</head>
<body>
<div id="header">
<h1 class="title">bup-index(1) Bup debian/0.29-3</h1>
<h2 class="author">Avery Pennarun <a href="mailto:apenwarr@gmail.com">apenwarr@gmail.com</a></h2>
<h3 class="date">2017-04-01</h3>
</div>
<h1 id="name">NAME</h1>
<p>bup-index - print and/or update the bup filesystem index</p>
<h1 id="synopsis">SYNOPSIS</h1>
<p>bup index <-p|-m|-s|-u|--clear|--check> [-H] [-l] [-x] [--fake-valid] [--no-check-device] [--fake-invalid] [-f <em>indexfile</em>] [--exclude <em>path</em>] [--exclude-from <em>filename</em>] [--exclude-rx <em>pattern</em>] [--exclude-rx-from <em>filename</em>] [-v] <paths...></p>
<h1 id="description">DESCRIPTION</h1>
<p><code>bup index</code> manipulates the filesystem index, which is a cache of absolute paths and their metadata (atttributes, SHA-1 hashes, etc.). The bup index is similar in function to the <code>git</code>(1) index, and the default index can be found in <code>$BUP_DIR/bupindex</code>.</p>
<p>Creating a backup in bup consists of two steps: updating the index with <code>bup index</code>, then actually backing up the files (or a subset of the files) with <code>bup save</code>. The separation exists for these reasons:</p>
<ol style="list-style-type: decimal">
<li><p>There is more than one way to generate a list of files that need to be backed up. For example, you might want to use <code>inotify</code>(7) or <code>dnotify</code>(7).</p></li>
<li><p>Even if you back up files to multiple destinations (for added redundancy), the file names, attributes, and hashes will be the same each time. Thus, you can save the trouble of repeatedly re-generating the list of files for each backup set.</p></li>
<li><p>You may want to use the data tracked by bup index for other purposes (such as speeding up other programs that need the same information).</p></li>
</ol>
<h1 id="notes">NOTES</h1>
<p>At the moment, bup will ignore Linux attributes (cf. chattr(1) and lsattr(1)) on some systems (any big-endian systems where sizeof(long) < sizeof(int)). This is because the Linux kernel and FUSE currently disagree over the type of the attr system call arguments, and so on big-endian systems there's no way to get the results without the risk of stack corruption (http://lwn.net/Articles/575846/). In these situations, bup will print a warning the first time Linux attrs are relevant during any index/save/restore operation.</p>
<p>bup makes accommodations for the expected "worst-case" filesystem timestamp resolution -- currently one second; examples include VFAT, ext2, ext3, small ext4, etc. Since bup cannot know the filesystem timestamp resolution, and could be traversing multiple filesystems during any given run, it always assumes that the resolution may be no better than one second.</p>
<p>As a practical matter, this means that index updates are a bit imprecise, and so <code>bup save</code> may occasionally record filesystem changes that you didn't expect. That's because, during an index update, if bup encounters a path whose actual timestamps are more recent than one second before the update started, bup will set the index timestamps for that path (mtime and ctime) to exactly one second before the run, -- effectively capping those values.</p>
<p>This ensures that no subsequent changes to those paths can result in timestamps that are identical to those in the index. If that were possible, bup could overlook the modifications.</p>
<p>You can see the effect of this behavior in this example (assume that less than one second elapses between the initial file creation and first index run):</p>
<pre><code>$ touch src/1 src/2
# A "sleep 1" here would avoid the unexpected save.
$ bup index src
$ bup save -n src src # Saves 1 and 2.
$ date > src/1
$ bup index src
$ date > src/2 # Not indexed.
$ bup save -n src src # But src/2 is saved anyway.</code></pre>
<p>Strictly speaking, bup should not notice the change to src/2, but it does, due to the accommodations described above.</p>
<h1 id="modes">MODES</h1>
<dl>
<dt>-u, --update</dt>
<dd>recursively update the index for the given paths and their descendants. One or more paths must be specified, and if a path ends with a symbolic link, the link itself will be indexed, not the target. If no mode option is given, <code>--update</code> is the default, and paths may be excluded by the <code>--exclude</code>, <code>--exclude-rx</code>, and <code>--one-file-system</code> options.
</dd>
<dt>-p, --print</dt>
<dd>print the contents of the index. If paths are given, shows the given entries and their descendants. If no paths are given, shows the entries starting at the current working directory (.).
</dd>
<dt>-m, --modified</dt>
<dd>prints only files which are marked as modified (ie. changed since the most recent backup) in the index. Implies <code>-p</code>.
</dd>
<dt>-s, --status</dt>
<dd>prepend a status code (A, M, D, or space) before each path. Implies <code>-p</code>. The codes mean, respectively, that a file is marked in the index as added, modified, deleted, or unchanged since the last backup.
</dd>
<dt>--check</dt>
<dd>carefully check index file integrity before and after updating. Mostly useful for automated tests.
</dd>
<dt>--clear</dt>
<dd>clear the default index.
</dd>
</dl>
<h1 id="options">OPTIONS</h1>
<dl>
<dt>-H, --hash</dt>
<dd>for each file printed, prepend the most recently recorded hash code. The hash code is normally generated by <code>bup save</code>. For objects which have not yet been backed up, the hash code will be 0000000000000000000000000000000000000000. Note that the hash code is printed even if the file is known to be modified or deleted in the index (ie. the file on the filesystem no longer matches the recorded hash). If this is a problem for you, use <code>--status</code>.
</dd>
<dt>-l, --long</dt>
<dd>print more information about each file, in a similar format to the <code>-l</code> option to <code>ls</code>(1).
</dd>
<dt>-x, --xdev, --one-file-system</dt>
<dd>don't cross filesystem boundaries when traversing the filesystem -- though as with tar and rsync, the mount points themselves will still be indexed. Only applicable if you're using <code>-u</code>.
</dd>
<dt>--fake-valid</dt>
<dd>mark specified paths as up-to-date even if they aren't. This can be useful for testing, or to avoid unnecessarily backing up files that you know are boring.
</dd>
<dt>--fake-invalid</dt>
<dd>mark specified paths as not up-to-date, forcing the next "bup save" run to re-check their contents.
</dd>
<dt>-f, --indexfile=<em>indexfile</em></dt>
<dd>use a different index filename instead of <code>$BUP_DIR/bupindex</code>.
</dd>
<dt>--exclude=<em>path</em></dt>
<dd>exclude <em>path</em> from the backup (may be repeated).
</dd>
<dt>--exclude-from=<em>filename</em></dt>
<dd>read --exclude paths from <em>filename</em>, one path per-line (may be repeated). Ignore completely empty lines.
</dd>
<dt>--exclude-rx=<em>pattern</em></dt>
<dd><p>exclude any path matching <em>pattern</em>, which must be a Python regular expression (http://docs.python.org/library/re.html). The pattern will be compared against the full path, without anchoring, so "x/y" will match "ox/yard" or "box/yards". To exclude the contents of /tmp, but not the directory itself, use "^/tmp/.". (may be repeated)</p>
<p>Examples:</p>
<ul>
<li>'/foo$' - exclude any file named foo</li>
<li>'/foo/$' - exclude any directory named foo</li>
<li>'/foo/.' - exclude the content of any directory named foo</li>
<li>'^/tmp/.' - exclude root-level /tmp's content, but not /tmp itself</li>
</ul>
</dd>
<dt>--exclude-rx-from=<em>filename</em></dt>
<dd>read --exclude-rx patterns from <em>filename</em>, one pattern per-line (may be repeated). Ignore completely empty lines.
</dd>
<dt>--no-check-device</dt>
<dd>don't mark an entry invalid if the device number (stat(2) st_dev) changes. This can be useful when indexing remote, automounted, or snapshot filesystems (LVM, Btrfs, etc.), where the device number isn't fixed.
</dd>
<dt>-v, --verbose</dt>
<dd>increase log output during update (can be used more than once). With one <code>-v</code>, print each directory as it is updated; with two <code>-v</code>, print each file too.
</dd>
</dl>
<h1 id="examples">EXAMPLES</h1>
<pre><code>bup index -vux /etc /var /usr</code></pre>
<h1 id="see-also">SEE ALSO</h1>
<p><code>bup-save</code>(1), <code>bup-drecurse</code>(1), <code>bup-on</code>(1)</p>
<h1 id="bup">BUP</h1>
<p>Part of the <code>bup</code>(1) suite.</p>
</body>
</html>
|