-
Notifications
You must be signed in to change notification settings - Fork 2
/
dirvish-expire.8
151 lines (144 loc) · 3.31 KB
/
dirvish-expire.8
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
.\" $Id: dirvish-expire.8,v 12.0 2004/02/25 02:42:14 jw Exp $ $Name: Dirvish-1_2 $
.ds d \-\^\-
.ds o \fR[\fP
.ds c \fR]\fP
.ds | \fR|\fP
.ds bank \fIbank\fP
.ds vault \fIvault\fP
.ds branch \fIbranch\fP
.ds image \fIimage\fP
.de D
\\.B \*d\\$1
..
.de DR
\\.BR \*d\\$1 \\$2
..
.de Bi
\\.BI \\$1 " \\$2"
..
.de DI
\\.BI \*d\\$1 \\$2
..
.de Di
\\.BI \*d\\$1 " \\$2"
..
.de See
See \fB\\$1\fP for more details.
..
.de SeeIn
See \fB\\$1\fP in \fB\\$2\fP for more details.
..
.de multiple
Multiple \fB\\$1:\fP values will accumulate.
..
.de default
Default value: \fB\\$1\fP
..
.TH DIRVISH-EXPIRE 8
.SH NAME
dirvish\-expire \- delete expired dirvish images
.SH SYNOPSIS
.BI dirvish\-expire [OPTIONS]
.SH DESCRIPTION
Delete dirvish image trees or whole images that have expired.
Each image
.B summary
file is checked for the
.B Expire:
field.
If that field indicates the image has expired
.B dirvish\-expire
will delete that image from the vault.
By default all subdirectories of all banks will be treated as vaults
and all directories therein
except the one named
.B dirvish
will be checked for summary files.
The removal of an image will have no effect on other images.
.B Dirvish\-expire
will not delete an image
unless it finds at least one image in that branch
that has an intact image tree and
.B "Status: success"
in the summary that is not expired.
.SH OPTIONS
Each option on the command line may be specified any number of times.
Those options that support lists in the config files
will accumulate all of their arguments
otherwise each specification will override the ones before.
Each option may be unambiguously abbreviated.
.TP
.Di time time_expression
Execute as though
.I time_expression
were the current time.
.I Time_expression
is processed by
.B Time::Parsedate(3pm)
so relative time and date strings are permitted.
.See Time::Parsedate(3pm)
.TP
.D tree
Only delete the image tree,
leave in place the rest of the image directory with summary,
log and any other image administrative files.
.TP
.Di vault vault
Restrict expiration to the specified
.IR vault .
.TP
.D no\-run
Don't actually do anything.
Just display what would have happened.
.TP
.D quiet
Run quietly, only report errors.
Normally
.B dirvish\-expire
will report the images deleted.
.SH EXIT CODES
To facilitate further automation and integration of
.B dirvish-expire
with other tools
.B dirvish-expire
provides rationalised exit codes.
The exit codes are range based. While the code for
a specific error may change from one version to another it
will remain within the specified range. So don't test for
specific exit codes but instead test for a range of values.
To the degree possible higher value ranges indicate more
severe errors.
.TP
0
success
.TP
200-219
An error was encountered in loading a configuration file.
.TP
220-254
An error was detected in the configuration.
.TP
255
Incorrect usage.
.SH FILES
.TP
.B /etc/dirvish/master.conf
alternate master configuration file.
.TP
.B /etc/dirvish.conf
master configuration file.
.TP
.IB bank/vault/image/ summary
image creation summary.
.TP
.IB bank/vault/image/ tree
actual image of source directory tree.
.SH SEE ALSO
.nf
dirvish.conf(5)
Time::ParseDate(3pm)
.SH BUGS
.B Dirvish\-expire
will walk the file hierarchy of all banks
or the specified vault looking for summary files.
Anything non-dirvish in there may cause excess file-walking.