4 purpose "the dyadic snapshot scheduler"
7 dss snapshot aging is implemented in terms of intervals. There are
8 two command line options related to intervals: the duration of a
9 'unit' interval and the number of those intervals.
11 dss removes any snapshots older than the given number of intervals
12 times the duration of an unit interval and tries to keep the following
13 amount of snapshots per interval:
15 interval number number of snapshots
16 ===============================================
17 0 2 ^ (num_intervals - 1)
18 1 2 ^ (num_intervals - 2)
19 2 2 ^ (num_intervals - 3)
25 In other words, the oldest snapshot will at most be unit_interval *
26 num_intervala old (= 5 days * 4 = 20 days if default values are used).
27 Moreover, there are at most 2^num_intervals - 1 snapshots in total
28 (i.e. 31 by default). Observe that you have to create at least
29 num_intervals snapshots each interval for this to work out. "
33 option "config_file" c
34 #~~~~~~~~~~~~~~~~~~~~~
35 "(default='~/.dssrc')"
37 string typestr="filename"
54 dss supports a couple of commands each of which corresponds to a different
55 command line option. Exactly one of these options must be given.
59 groupoption "create" C
60 #~~~~~~~~~~~~~~~~~~~~~
61 "create a new snapshot"
64 Execute the rsync command to create a new snapshot.Mote that this
65 command does not care about free disk space.
69 "remove a redundant snapshot"
72 A snapshot is considered redundant if it ether belongs to
73 an interval greater than the maximum nuber of intervals,
74 or if it belongs to an interval that already contains more
75 than the desired number of snapshots.
80 "print a list of all snapshots"
83 The list will contain all snapshots not matter of their state,
84 i.e. incomplete snapshots and snapshots being deleted will
90 "start creating and pruning snapshots"
93 This is the main mode of operation. Snapshots will be created
94 as needed and pruned automatically.
100 "logfile for the dss daemon process"
102 string typestr="filename"
105 section "rsync-related options"
106 #==============================
108 option "remote_user" U
109 #~~~~~~~~~~~~~~~~~~~~~
111 "remote user name (default: current user)"
113 string typestr="username"
116 option "remote_host" H
117 #~~~~~~~~~~~~~~~~~~~~~
121 string typestr="hostname"
125 option "source_dir" S
126 #~~~~~~~~~~~~~~~~~~~~
128 "directory to backup on the remote host"
130 string typestr="dirname"
136 "snapshots dir on the local host"
138 string typestr="dirname"
141 option "rsync_option" O
142 #~~~~~~~~~~~~~~~~~~~~~~
144 "further rsync options that are passed
145 verbatim to the rsync command."
147 string typestr="option"
152 option "exclude_patterns" e
153 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
155 "rsync exclude patterns"
157 string typestr="path"
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.