4 purpose "the dyadic snapshot scheduler"
11 string typestr="filename"
29 "logfile for the dss daemon process"
31 string typestr="filename"
38 dss supports a couple of commands each of which corresponds to a different
39 command line option. Exactly one of these options must be given.
43 groupoption "create" C
44 #~~~~~~~~~~~~~~~~~~~~~
45 "create a new snapshot"
48 Execute the rsync command to create a new snapshot.Mote that this
49 command does not care about free disk space.
53 "remove a redundant snapshot"
56 A snapshot is considered redundant if it ether belongs to
57 an interval greater than the maximum nuber of intervals,
58 or if it belongs to an interval that already contains more
59 than the desired number of snapshots.
64 "print a list of all snapshots"
67 The list will contain all snapshots not matter of their state,
68 i.e. incomplete snapshots and snapshots being deleted will
74 "start creating and pruning snapshots"
77 This is the main mode of operation. Snapshots will be created
78 as needed and pruned automatically.
81 section "rsync-related options"
82 #==============================
84 option "remote_user" U
85 #~~~~~~~~~~~~~~~~~~~~~
87 "remote user name (default: current user)"
89 string typestr="username"
92 option "remote_host" H
93 #~~~~~~~~~~~~~~~~~~~~~
97 string typestr="hostname"
101 option "source_dir" S
102 #~~~~~~~~~~~~~~~~~~~~
104 "directory to backup on the remote host"
106 string typestr="dirname"
112 "snapshots dir on the local host"
114 string typestr="dirname"
117 option "rsync_option" O
118 #~~~~~~~~~~~~~~~~~~~~~~
120 "further rsync options that are passed
121 verbatim to the rsync command."
123 string typestr="option"
128 option "exclude_patterns" e
129 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
131 "rsync exclude patterns"
133 string typestr="path"
141 dss snapshot aging is implemented in terms of intervals. There are
142 two command line options related to intervals: the duration of a
143 'unit' interval and the number of those unit intervals.
145 dss removes any snapshots older than the given number of intervals
146 times the duration of an unit interval and tries to keep the following
147 number of snapshots per interval:
149 interval number number of snapshots
150 ===============================================
151 0 2 ^ (num_intervals - 1)
152 1 2 ^ (num_intervals - 2)
153 2 2 ^ (num_intervals - 3)
159 In other words, the oldest snapshot will at most be unit_interval *
160 num_intervala old (= 5 days * 4 = 20 days if default values are used).
161 Moreover, there are at most 2^num_intervals - 1 snapshots in total
162 (i.e. 31 by default). Observe that you have to create at least
163 num_intervals snapshots each interval for this to work out. "
165 option "unit_interval" u
166 #~~~~~~~~~~~~~~~~~~~~~~~
167 "the duration of a unit interval"
173 option "num_intervals" n
174 #~~~~~~~~~~~~~~~~~~~~~~~
175 "the number of unit intervals"
184 option "pre_create_hook" r
185 #~~~~~~~~~~~~~~~~~~~~~~~~~~
186 "Executed before snapshot creation"
188 string typestr="command"
193 Execute this command before trying to create a new snapshot
194 If this command returns with a non-zero exit status, do not
195 perform the backup. One possible application of this is to
196 return non-zero during office hours in order to not slow down
197 the file systems by taking snapshots.
201 option "post_create_hook" o
202 #~~~~~~~~~~~~~~~~~~~~~~~~~~
203 "Executed after snapshot creation"
205 string typestr="command"
210 Execute this after a snapshot has successfully been created
211 The return value on the command is ignored. For instance one
212 could count the number of files per user and/or the disk
213 usage patterns in order to store them in a database for
216 option "creation_sleep" s
217 #~~~~~~~~~~~~~~~~~~~~~~~~
220 int typestr="minutes"
225 The sleep interval for snapshot creation in minutes.
226 The daemon will, in an endlees loop, create a snapshot and
227 then sleep that many minutes.
234 "minimal amount of free space"
236 int typestr="gigabytes"
241 If less that this many gigabytes of space is available,
242 dss will start to remove snapshots (starting from the oldest
243 snapshot) until the free disk space exeecds this value.