]> git.tuebingen.mpg.de Git - dss.git/blob - dss.ggo
Initial git checkin.
[dss.git] / dss.ggo
1
2 text "
3 dss snapshot aging is implemented in terms of intervals. There are
4 two command line options related to intervals: the duration of a
5 'unit' interval and the number of those intervals.
6
7 dss removes any snapshots older than the given number of intervals
8 times the duration of an unit interval and tries to keep the following
9 amount of snapshots per interval:
10
11         interval number         number of snapshots
12         ===============================================
13         0                       2 ^ (num_intervals - 1)
14         1                       2 ^ (num_intervals - 2)
15         2                       2 ^ (num_intervals - 3)
16         ...
17         num_intervals - 2                       2
18         num_intervals - 1                       1
19         num_intervals                           0
20
21 In other words, the oldest snapshot will at most be unit_interval *
22 num_intervala old (= 5 days * 4 = 20 days if default values are used).
23 Moreover, there are at most 2^num_intervals - 1 snapshots in total
24 (i.e. 31 by default).  Observe that you have to create at least
25 num_intervals snapshots each interval for this to work out.  "
26
27
28
29 package "dss"
30 version "0.0.1"
31
32 option "config_file" c
33 #~~~~~~~~~~~~~~~~~~~~~
34 "(default='~/.dssrc')"
35
36         string typestr="filename"
37         optional
38
39 section "Logging"
40 #~~~~~~~~~~~~~~~~
41
42 option "loglevel" l
43 #~~~~~~~~~~~~~~~~~~
44
45 "set loglevel (0-6)"
46
47         int typestr="level"
48         default="4"
49         optional
50
51 option "logfile" L
52 #~~~~~~~~~~~~~~~~~~
53
54 "logfile for the dss daemon process"
55
56         string typestr="filename"
57         optional
58
59 section "rsync-related options"
60 #==============================
61
62 option "remote_user" U
63 #~~~~~~~~~~~~~~~~~~~~~
64
65 "remote user name (default: current user)"
66
67         string typestr="username"
68         optional
69
70 option "remote_host" H
71 #~~~~~~~~~~~~~~~~~~~~~
72
73 "remote host"
74
75         string typestr="hostname"
76         default="localhost"
77         optional
78
79 option "source_dir" S
80 #~~~~~~~~~~~~~~~~~~~~
81
82 "directory to backup on the remote host"
83
84         string typestr="dirname"
85         optional
86
87 option "dest_dir" D
88 #~~~~~~~~~~~~~~~~~~
89
90 "snapshots dir on the local host"
91
92         string typestr="dirname"
93         optional
94
95 option "rsync_option" O
96 #~~~~~~~~~~~~~~~~~~~~~~
97
98 "further rsync options that are passed
99 verbatim to the rsync command."
100
101         string typestr="option"
102         optional
103         multiple
104
105
106 option "exclude_patterns" e
107 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
108
109 "rsync exclude patterns"
110
111         string typestr="path"
112         optional
113
114
115 section "Intervals"
116 #~~~~~~~~~~~~~~~~~~
117
118
119 option "unit_interval" u
120 #~~~~~~~~~~~~~~~~~~~~~~~
121 "the duration of a unit interval"
122
123         int typestr="days"
124         default="4"
125         optional
126
127 option "num_intervals" n
128 #~~~~~~~~~~~~~~~~~~~~~~~
129 "the number of unit intervals"
130
131         int typestr="num"
132         default="5"
133         optional
134
135 section "Hooks"
136 #==============
137
138 option "pre_create_hook" r
139 #~~~~~~~~~~~~~~~~~~~~~~~~~~
140 "Executed before snapshot creation"
141
142         string typestr="command"
143         default="/bin/true"
144         optional
145
146 text "
147         Execute this command before trying to create a new snapshot
148         If this command returns with a non-zero exit status, do not
149         perform the backup. One possible application of this is to
150         return non-zero during office hours in order to not slow down
151         the file systems by taking snapshots.
152 "
153
154
155 option "post_create_hook" o
156 #~~~~~~~~~~~~~~~~~~~~~~~~~~
157 "Executed after snapshot creation"
158
159         string typestr="command"
160         default="/bin/true"
161         optional
162
163 text "
164         Execute this after a snapshot has successfully been created
165         The return value on the command is ignored. For instance one
166         could count the number of files per user and/or the disk
167         usage patterns in order to store them in a database for
168         further treatment.
169 "
170 option "creation_sleep" s
171 #~~~~~~~~~~~~~~~~~~~~~~~~
172 "sleep interval"
173
174         int typestr="minutes"
175         default="60"
176         optional
177
178 text "
179         The sleep interval for snapshot creation in minutes.
180         The daemon will, in an endlees loop, create a snapshot and
181         then sleep that many minutes.
182 "
183
184
185 option "min_free" m
186 #~~~~~~~~~~~~~~~~~~
187
188 "minimal amount of free space"
189
190         int typestr="gigabytes"
191         default="50"
192         optional
193
194 text "
195         If less that this many gigabytes of space is available,
196         dss will start to remove snapshots (starting from the oldest
197         snapshot) until the free disk space exeecds this value.
198 "
199
200
201 text "
202 subcommands:
203
204 ls:
205
206         Print list of existing snapshots.
207
208         Usage: ls
209
210 free:
211
212         Remove old snapshots in order to free space.
213
214         Usage: free [size]
215
216         Without size parameter, print the amount of free space on the file system
217         in human-readable format.
218
219         Otherwise, remove snapshots (starting from the oldest one) until the number of
220         free space exceeds the given number of gigabytes.
221         Use with caution!
222 "