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.
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:
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)
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. "
32 option "config_file" c
33 #~~~~~~~~~~~~~~~~~~~~~
34 "(default='~/.dssrc')"
36 string typestr="filename"
54 "logfile for the dss daemon process"
56 string typestr="filename"
59 section "rsync-related options"
60 #==============================
62 option "remote_user" U
63 #~~~~~~~~~~~~~~~~~~~~~
65 "remote user name (default: current user)"
67 string typestr="username"
70 option "remote_host" H
71 #~~~~~~~~~~~~~~~~~~~~~
75 string typestr="hostname"
82 "directory to backup on the remote host"
84 string typestr="dirname"
90 "snapshots dir on the local host"
92 string typestr="dirname"
95 option "rsync_option" O
96 #~~~~~~~~~~~~~~~~~~~~~~
98 "further rsync options that are passed
99 verbatim to the rsync command."
101 string typestr="option"
106 option "exclude_patterns" e
107 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
109 "rsync exclude patterns"
111 string typestr="path"
119 option "unit_interval" u
120 #~~~~~~~~~~~~~~~~~~~~~~~
121 "the duration of a unit interval"
127 option "num_intervals" n
128 #~~~~~~~~~~~~~~~~~~~~~~~
129 "the number of unit intervals"
138 option "pre_create_hook" r
139 #~~~~~~~~~~~~~~~~~~~~~~~~~~
140 "Executed before snapshot creation"
142 string typestr="command"
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.
155 option "post_create_hook" o
156 #~~~~~~~~~~~~~~~~~~~~~~~~~~
157 "Executed after snapshot creation"
159 string typestr="command"
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
170 option "creation_sleep" s
171 #~~~~~~~~~~~~~~~~~~~~~~~~
174 int typestr="minutes"
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.
188 "minimal amount of free space"
190 int typestr="gigabytes"
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.
206 Print list of existing snapshots.
212 Remove old snapshots in order to free space.
216 Without size parameter, print the amount of free space on the file system
217 in human-readable format.
219 Otherwise, remove snapshots (starting from the oldest one) until the number of
220 free space exceeds the given number of gigabytes.