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
47 dss supports a couple of commands each of which corresponds to a different
48 command line option. Exactly one of these options must be given.
52 groupoption "create" C
53 #~~~~~~~~~~~~~~~~~~~~~
54 "create a new snapshot"
57 Execute the rsync command to create a new snapshot.Mote that this
58 command does not care about free disk space.
62 "remove a redundant snapshot"
65 A snapshot is considered redundant if it ether belongs to
66 an interval greater than the maximum nuber of intervals,
67 or if it belongs to an interval that already contains more
68 than the desired number of snapshots.
73 "print a list of all snapshots"
76 The list will contain all snapshots not matter of their state,
77 i.e. incomplete snapshots and snapshots being deleted will
83 "start creating and pruning snapshots"
86 This is the main mode of operation. Snapshots will be created
87 as needed and pruned automatically.
90 section "rsync-related options"
91 #==============================
93 option "remote_user" U
94 #~~~~~~~~~~~~~~~~~~~~~
96 "remote user name (default: current user)"
98 string typestr="username"
101 option "remote_host" H
102 #~~~~~~~~~~~~~~~~~~~~~
106 string typestr="hostname"
110 option "source_dir" S
111 #~~~~~~~~~~~~~~~~~~~~
113 "directory to backup on the remote host"
115 string typestr="dirname"
121 "snapshots dir on the local host"
123 string typestr="dirname"
126 option "rsync_option" O
127 #~~~~~~~~~~~~~~~~~~~~~~
129 "further rsync options that are passed
130 verbatim to the rsync command."
132 string typestr="option"
137 option "exclude_patterns" e
138 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
140 "rsync exclude patterns"
142 string typestr="path"
150 dss snapshot aging is implemented in terms of intervals. There are
151 two command line options related to intervals: the duration of a
152 'unit' interval and the number of those unit intervals.
154 dss removes any snapshots older than the given number of intervals
155 times the duration of an unit interval and tries to keep the following
156 number of snapshots per interval:
158 interval number number of snapshots
159 ===============================================
160 0 2 ^ (num_intervals - 1)
161 1 2 ^ (num_intervals - 2)
162 2 2 ^ (num_intervals - 3)
168 In other words, the oldest snapshot will at most be unit_interval *
169 num_intervala old (= 5 days * 4 = 20 days if default values are used).
170 Moreover, there are at most 2^num_intervals - 1 snapshots in total
171 (i.e. 31 by default). Observe that you have to create at least
172 num_intervals snapshots each interval for this to work out. "
174 option "unit_interval" u
175 #~~~~~~~~~~~~~~~~~~~~~~~
176 "the duration of a unit interval"
182 option "num_intervals" n
183 #~~~~~~~~~~~~~~~~~~~~~~~
184 "the number of unit intervals"
193 option "pre_create_hook" r
194 #~~~~~~~~~~~~~~~~~~~~~~~~~~
195 "Executed before snapshot creation"
197 string typestr="command"
202 Execute this command before trying to create a new snapshot
203 If this command returns with a non-zero exit status, do not
204 perform the backup. One possible application of this is to
205 return non-zero during office hours in order to not slow down
206 the file systems by taking snapshots.
210 option "post_create_hook" o
211 #~~~~~~~~~~~~~~~~~~~~~~~~~~
212 "Executed after snapshot creation"
214 string typestr="command"
219 Execute this after a snapshot has successfully been created
220 The return value on the command is ignored. For instance one
221 could count the number of files per user and/or the disk
222 usage patterns in order to store them in a database for
225 option "creation_sleep" s
226 #~~~~~~~~~~~~~~~~~~~~~~~~
229 int typestr="minutes"
234 The sleep interval for snapshot creation in minutes.
235 The daemon will, in an endlees loop, create a snapshot and
236 then sleep that many minutes.
243 "minimal amount of free space"
245 int typestr="gigabytes"
250 If less that this many gigabytes of space is available,
251 dss will start to remove snapshots (starting from the oldest
252 snapshot) until the free disk space exeecds this value.