4 purpose "the dyadic snapshot scheduler"
11 string typestr="filename"
29 "logfile for the dss daemon process"
31 string typestr="filename"
36 "run as background daemon"
40 Note that dsss refuses to start in daemon mode if no logfile
46 "only print what would be done"
49 This flag does not makes sense for all commands. The run
50 command refuses to start if this option was given. The ls
51 command silently ignores this flag.
57 dss supports a couple of commands each of which corresponds to a different
58 command line option. Exactly one of these options must be given.
62 groupoption "create" C
63 #~~~~~~~~~~~~~~~~~~~~~
64 "create a new snapshot"
67 Execute the rsync command to create a new snapshot.Mote that this
68 command does not care about free disk space.
72 "remove a redundant snapshot"
75 A snapshot is considered redundant if it ether belongs to
76 an interval greater than the maximum nuber of intervals,
77 or if it belongs to an interval that already contains more
78 than the desired number of snapshots.
83 "print a list of all snapshots"
86 The list will contain all snapshots not matter of their state,
87 i.e. incomplete snapshots and snapshots being deleted will
93 "start creating and pruning snapshots"
96 This is the main mode of operation. Snapshots will be created
97 as needed and pruned automatically.
100 section "rsync-related options"
101 #==============================
103 option "remote_user" U
104 #~~~~~~~~~~~~~~~~~~~~~
106 "remote user name (default: current user)"
108 string typestr="username"
111 option "remote_host" H
112 #~~~~~~~~~~~~~~~~~~~~~
116 string typestr="hostname"
120 option "source_dir" -
121 #~~~~~~~~~~~~~~~~~~~~
123 "directory to backup on the remote host"
125 string typestr="dirname"
131 "snapshots dir on the local host"
133 string typestr="dirname"
136 option "rsync_option" O
137 #~~~~~~~~~~~~~~~~~~~~~~
139 "further rsync options that are passed
140 verbatim to the rsync command."
142 string typestr="option"
147 option "exclude_patterns" e
148 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
150 "rsync exclude patterns"
152 string typestr="path"
160 dss snapshot aging is implemented in terms of intervals. There are
161 two command line options related to intervals: the duration of a
162 'unit' interval and the number of those unit intervals.
164 dss removes any snapshots older than the given number of intervals
165 times the duration of an unit interval and tries to keep the following
166 number of snapshots per interval:
168 interval number number of snapshots
169 ===============================================
170 0 2 ^ (num_intervals - 1)
171 1 2 ^ (num_intervals - 2)
172 2 2 ^ (num_intervals - 3)
178 In other words, the oldest snapshot will at most be unit_interval *
179 num_intervala old (= 5 days * 4 = 20 days if default values are used).
180 Moreover, there are at most 2^num_intervals - 1 snapshots in total
181 (i.e. 31 by default). Observe that you have to create at least
182 num_intervals snapshots each interval for this to work out. "
184 option "unit_interval" u
185 #~~~~~~~~~~~~~~~~~~~~~~~
186 "the duration of a unit interval"
192 option "num_intervals" n
193 #~~~~~~~~~~~~~~~~~~~~~~~
194 "the number of unit intervals"
203 option "pre_create_hook" r
204 #~~~~~~~~~~~~~~~~~~~~~~~~~~
205 "Executed before snapshot creation"
207 string typestr="command"
212 Execute this command before trying to create a new snapshot
213 If this command returns with a non-zero exit status, do not
214 perform the backup. One possible application of this is to
215 return non-zero during office hours in order to not slow down
216 the file systems by taking snapshots.
220 option "post_create_hook" o
221 #~~~~~~~~~~~~~~~~~~~~~~~~~~
222 "Executed after snapshot creation"
224 string typestr="command"
229 Execute this after a snapshot has successfully been created
230 The return value on the command is ignored. For instance one
231 could count the number of files per user and/or the disk
232 usage patterns in order to store them in a database for
235 option "creation_sleep" s
236 #~~~~~~~~~~~~~~~~~~~~~~~~
239 int typestr="minutes"
244 The sleep interval for snapshot creation in minutes.
245 The daemon will, in an endlees loop, create a snapshot and
246 then sleep that many minutes.
253 "minimal amount of free space"
255 int typestr="gigabytes"
260 If less that this many gigabytes of space is available,
261 dss will start to remove snapshots (starting from the oldest
262 snapshot) until the free disk space exeecds this value.