/
bup-index.1
135 lines (135 loc) · 4.02 KB
/
bup-index.1
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
.TH bup-index 1 "2011-01-02" "Bup 0\.20-32-g6eedafc"
.SH NAME
.PP
bup-index - print and/or update the bup filesystem index
.SH SYNOPSIS
.PP
bup index <-p|-m|-u> [-s] [-H] [-l] [-x] [--fake-valid] [--check]
[-f \f[I]indexfile\f[]] [--exclude \f[I]path\f[]] [--exclude-from
\f[I]filename\f[]] [-v] <filenames\.\.\.>
.SH DESCRIPTION
.PP
\f[B]bup\ index\f[] prints and/or updates the bup filesystem index,
which is a cache of the filenames, attributes, and sha-1 hashes of
each file and directory in the filesystem\. The bup index is
similar in function to the \f[B]git\f[](1) index, and can be found
in \f[B]~/\.bup/bupindex\f[]\.
.PP
Creating a backup in bup consists of two steps: updating the index
with \f[B]bup\ index\f[], then actually backing up the files (or a
subset of the files) with \f[B]bup\ save\f[]\. The separation
exists for these reasons:
.IP "1." 3
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
\f[B]inotify\f[](7) or \f[B]dnotify\f[](7)\.
.IP "2." 3
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\.
.IP "3." 3
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)\.
.SH OPTIONS
.TP
.B -u, --update
(recursively) update the index for the given filenames and their
descendants\. One or more filenames must be given\.
.RS
.RE
.TP
.B -p, --print
print the contents of the index\. If filenames are given, shows the
given entries and their descendants\. If no filenames are given,
shows the entries starting at the current working directory (\.)\.
.RS
.RE
.TP
.B -m, --modified
prints only files which are marked as modified (ie\. changed since
the most recent backup) in the index\. Implies \f[B]-p\f[]\.
.RS
.RE
.TP
.B -s, --status
prepend a status code (A, M, D, or space) before each filename\.
Implies \f[B]-p\f[]\. The codes mean, respectively, that a file is
marked in the index as added, modified, deleted, or unchanged since
the last backup\.
.RS
.RE
.TP
.B -H, --hash
for each file printed, prepend the most recently recorded hash
code\. The hash code is normally generated by \f[B]bup\ save\f[]\.
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
\f[B]--status\f[]\.
.RS
.RE
.TP
.B -l, --long
print more information about each file, in a similar format to the
\f[B]-l\f[] option to \f[B]ls\f[](1)\.
.RS
.RE
.TP
.B -x, --xdev, --one-file-system
don\[aq]t cross filesystem boundaries when recursing through the
filesystem\. Only applicable if you\[aq]re using \f[B]-u\f[]\.
.RS
.RE
.TP
.B --fake-valid
mark specified filenames as up-to-date even if they aren\[aq]t\.
This can be useful for testing, or to avoid unnecessarily backing
up files that you know are boring\.
.RS
.RE
.TP
.B --check
carefully check index file integrity before and after updating\.
Mostly useful for automated tests\.
.RS
.RE
.TP
.B -f, --indexfile=\f[I]indexfile\f[]
use a different index filename instead of
\f[B]~/\.bup/bupindex\f[]\.
.RS
.RE
.TP
.B --exclude=\f[I]path\f[]
a path to exclude from the backup (can be used more than once)
.RS
.RE
.TP
.B --exclude-from=\f[I]filename\f[]
a file that contains exclude paths (can be used more than once)
.RS
.RE
.TP
.B -v, --verbose
increase log output during update (can be used more than once)\.
With one \f[B]-v\f[], print each directory as it is updated; with
two \f[B]-v\f[], print each file too\.
.RS
.RE
.SH EXAMPLE
.PP
\f[CR]
bup\ index\ -vux\ /etc\ /var\ /usr
\f[]
.SH SEE ALSO
.PP
\f[B]bup-save\f[](1), \f[B]bup-drecurse\f[](1), \f[B]bup-on\f[](1)
.SH BUP
.PP
Part of the \f[B]bup\f[](1) suite\.
.SH AUTHOR
Avery Pennarun <apenwarr@gmail.com>