da67d455808cbd9a24812c672c7b821c6aa36a9e
[debian/amanda] / example / template.d / dumptypes
1 # dumptypes
2 #
3 # These are referred to by the disklist file.  The dumptype specifies
4 # certain parameters for dumping including:
5 #   auth        - authentication scheme to use between server and client.
6 #                 Valid values are "bsd", "bsdudp", "bsdtcp", "krb5", "local",
7 #                 "rsh" and "ssh" 
8 #                 Default: [auth bsd]
9 #   comment     - just a comment string
10 #   comprate    - set default compression rate.  Should be followed by one or
11 #                 two numbers, optionally separated by a comma.  The 1st is
12 #                 the full compression rate; the 2nd is the incremental rate.
13 #                 If the second is omitted, it is assumed equal to the first.
14 #                 The numbers represent the amount of the original file the
15 #                 compressed file is expected to take up.
16 #                 Default: [comprate 0.50, 0.50]
17 #   compress    - specify compression of the backed up data.  Valid values are:
18 #                 "none"        - don't compress the dump output.
19 #                 "client best" - compress on the client using the best (and
20 #                                 probably slowest) algorithm.
21 #                 "client fast" - compress on the client using fast algorithm.
22 #                 "client custom" - compress using your custom client compression program.
23 #                                   use client_custom_compress "PROG" to specify
24 #                                   the custom compression program.
25 #                                   PROG must not contain white space.
26 #                 "server best" - compress on the tape host using the best (and
27 #                                 probably slowest) algorithm.
28 #                 "server fast" - compress on the tape host using a fast
29 #                                 algorithm.  This may be useful when a fast
30 #                                 tape host is backing up slow clients.
31 #                 "server custom" - compress using your server custom compression program.
32 #                                   use server_custom_compress "PROG" to specify
33 #                                   the custom compression program.
34 #                                   PROG must not contain white space.
35 #                 Default: [compress client fast]
36 #   dumpcycle   - set the number of days in the dump cycle, ie, set how often a
37 #                 full dump should be performed.  Default: from DUMPCYCLE variable
38 #   estimate      Determine the way AMANDA does it's estimate. 
39 #                 "client"      - Use the same program as the dumping program,
40 #                               this is the most accurate way to do estimates, 
41 #                               but it can take a long time.
42 #                 "calcsize"    - Use a faster program to do estimates, but the
43 #                               result is less accurate.
44 #                 "server"      - Use only statistics from the previous run to 
45 #                               give an estimate, 
46 #                               it takes only a few seconds but the result is not 
47 #                               accurate if your disk usage changes from day to day.
48 #                 Default: [client]
49 #   encrypt  - specify encryption of the backed up data. Valid values are:
50 #                 "none"   - don't encrypt the dump output.
51 #                 "client" - encrypt on the client using the program specified by
52 #                            client_encrypt "PROG".
53 #                            Use client_decrypt_option to specify the decrypt-
54 #                            parameter, default is "-d".
55 #                            PROG and decrypt-parameter must not contain white space.
56 #                 "server" - encrypt on the server using the program specified by
57 #                            server_encrypt "PROG".
58 #                            Use server_decrypt_option to specify the decrypt-
59 #                            parameter, default is "-d".
60 #                            PROG and decrypt-parameter must not contain white space.
61 #                 Default: [none]
62 #   exclude     - specify files and directories to be excluded from the dump.
63 #                 Useful with gnutar only; silently ignored by dump and samba.
64 #                 Valid values are:
65 #                 "pattern"       - a shell glob pattern defining which files
66 #                                   to exclude.
67 #                                   gnutar gets --exclude="pattern"
68 #                 list "filename" - a file (on the client!) containing patterns
69 #                                   re's (1 per line) defining which files to
70 #                                   exclude.
71 #                                   gnutar gets --exclude-from="filename"
72 #                 Note that the `full pathname' of a file within its
73 #                 filesystem starts with `./', because of the way amanda runs
74 #                 gnutar: `tar -C $mountpoint -cf - --lots-of-options .' (note
75 #                 the final dot!)  Thus, if you're backing up `/usr' with a
76 #                 diskfile entry like ``host /usr gnutar-root', but you don't
77 #                 want to backup /usr/tmp, your exclude list should contain
78 #                 the pattern `./tmp', as this is relative to the `/usr' above.
79 #                 Please refer to the man-page of gnutar for more information.
80 #                 If a relative pathname is specified as the exclude list,
81 #                 it is searched from within the directory that is
82 #                 going to be backed up.
83 #                 Default: include all files
84 #   holdingdisk - should the holding disk be used for this dump.  Useful for
85 #                 dumping the holding disk itself.  Default: [holdingdisk auto]
86 #                 "never"    - Never use the holding disk.
87 #                 "auto"     - Use the holding disk if possible.
88 #                 "required" - Always use the holding disk.
89 #   ignore      - do not back this filesystem up.  Useful for sharing a single
90 #                 disklist in several configurations.
91 #   index       - keep an index of the files backed up.  Default: [index no]
92 #   kencrypt    - encrypt the data stream between the client and server.
93 #                 Default: [kencrypt no]
94 #   maxdumps    - max number of concurrent dumps to run on the client.
95 #                 Default: [maxdumps 1]
96 #   maxpromoteday - max number of day for a promotion, set it 0 if you don't
97 #                 want promotion, set it to 1 or 2 if your disk get
98 #                 overpromoted.
99 #                 Default: [10000]
100 #   priority    - priority level of the dump.  Valid levels are "low", "medium"
101 #                 or "high".  These are really only used when Amanda has no
102 #                 tape to write to because of some error.  In that "degraded
103 #                 mode", as many incrementals as will fit on the holding disk
104 #                 are done, higher priority first, to insure the important
105 #                 disks are at least dumped.  Default: [priority medium]
106 #   program     - specify the dump system to use.  Valid values are "DUMP" 
107 #                 "STAR" and "GNUTAR".  Default: [program "DUMP"].
108 #   record      - record the backup in the time-stamp-database of the backup
109 #                 program (e.g. /etc/dumpdates for DUMP or
110 #                 /var/lib/amanda/gnutar-lists for GNUTAR.).
111 #                 Default: [record yes]
112 #   skip-full   - skip the disk when a level 0 is due, to allow full backups
113 #                 outside Amanda, eg when the machine is in single-user mode.
114 #   skip-incr   - skip the disk when the level 0 is NOT due.  This is used in
115 #                 archive configurations, where only full dumps are done and
116 #                 the tapes saved.
117 #   starttime   - delay the start of the dump?  Default: no delay
118 #   strategy    - set the dump strategy.  Valid strategies are currently:
119 #                 "standard" - the standard one.
120 #                 "nofull"   - do level 1 dumps every time.  This can be used,
121 #                              for example, for small root filesystems that
122 #                              only change slightly relative to a site-wide
123 #                              prototype.  Amanda then backs up just the
124 #                              changes.
125 #                 "noinc"    - do level 0 dumps every time.
126 #                 "skip"     - skip all dumps.  Useful for sharing a single
127 #                              disklist in several configurations.
128 #                 "incronly" - do only incremental dumps. This is similar
129 #                              to strategy 'nofull', but will increase
130 #                              the dump level as usual. Full dumps will
131 #                              only be performed when an 'amadmin force' 
132 #                              has been issued 
133 #                 Default: [strategy standard]
134 # tape_splitsize - (optional) split dump file into pieces of a specified size.
135 #                 This allows dumps to be spread across multiple tapes, and can
136 #                 potentially make more efficient use of tape space.  Note that
137 #                 if this value is too large (more than half the size of the
138 #                 average dump being split), substantial tape space can be
139 #                 wasted.  If too small, large dumps will be split into
140 #                 innumerable tiny dumpfiles, adding to restoration complexity.
141 #                 A good rule of thumb, usually, is 1/10 of the size of your
142 #                 tape.  Default: [disabled]
143 # split_diskbuffer - (optional) When dumping a split dump  in  PORT-WRITE
144 #                 mode (usually meaning "no holding disk"), buffer the split
145 #                 chunks to a file in the directory specified by this option.
146 #                 Default: [none]
147 # fallback_splitsize - (optional) When dumping a split dump  in  PORT-WRITE
148 #                 mode, if no split_diskbuffer is specified (or if we somehow
149 #                 fail to use our split_diskbuffer), we must buffer split
150 #                 chunks in memory.  This specifies the maximum size split
151 #                 chunks can be in this scenario, and thus the maximum amount
152 #                 of memory consumed for in-memory splitting.  Default: [10m]
153 #
154 #
155 # Note that you may specify previously defined dumptypes as a shorthand way
156 # of defining parameters.
157
158 # dumptype global defined in $config/amanda.conf
159
160 define dumptype always-full {
161     global
162     comment "Full dump of this filesystem always"
163     compress none
164     priority high
165     dumpcycle 0
166 }
167
168 # Dumptypes for star
169 define dumptype root-star {
170     global
171     program "STAR"
172     comment "root partitions dumped with star"
173     compress none
174     index
175 #    exclude list "/var/lib/amanda/exclude.star"
176     priority low
177 }
178
179 define dumptype user-star {
180     root-star
181     comment "user partitions dumped with star"
182     priority medium
183 }
184
185 define dumptype user-star-span {
186     root-star
187     tape_splitsize 3 Gb
188     comment "tape-spanning user partitions dumped with star"
189     priority medium
190 }
191
192 define dumptype high-star {
193     root-star
194     comment "partitions dumped with star"
195     priority high
196 }
197
198 define dumptype comp-root-star {
199     root-star
200     comment "Root partitions with compression"
201     compress client fast
202 }
203
204 define dumptype comp-user-star {
205     user-star
206     compress client fast
207 }
208
209 define dumptype comp-user-star-span {
210     user-star-span
211     compress client fast
212 }
213
214 # Dumptypes for gnutar
215
216 define dumptype root-tar {
217     global
218     program "GNUTAR"
219     comment "root partitions dumped with tar"
220     compress none 
221     index
222     priority low
223 }
224
225
226 define dumptype user-tar {
227     root-tar
228     comment "user partitions dumped with tar"
229     priority medium
230 }
231
232
233 define dumptype user-tar-span {
234     root-tar
235     tape_splitsize 3 Gb
236     comment "tape-spanning user partitions dumped with tar"
237     priority medium
238 }
239
240
241 define dumptype high-tar {
242     root-tar
243     comment "partitions dumped with tar"
244     priority high
245 }
246
247 define dumptype comp-root-tar {
248     root-tar
249     comment "Root partitions with compression dumped with tar"
250     compress client fast
251 }
252
253 define dumptype comp-user-tar {
254     user-tar
255     compress client fast
256 }
257
258 define dumptype comp-user-tar-span {
259     user-tar-span
260     compress client fast
261 }
262
263
264 define dumptype holding-disk {
265     global
266     comment "The master-host holding disk itself"
267     holdingdisk never # do not use the holding disk
268     priority medium
269 }
270
271 define dumptype comp-user {
272     global
273     comment "Non-root partitions on reasonably fast machines"
274     compress client fast
275     priority medium
276 }
277
278 define dumptype comp-user-span {
279     global
280     tape_splitsize 5 Gb
281     comment "Tape-spanning non-root partitions on reasonably fast machines"
282     compress client fast
283     priority medium
284 }
285
286
287 define dumptype nocomp-user {
288     comp-user
289     comment "Non-root partitions on slow machines"
290     compress none
291 }
292
293 define dumptype nocomp-user-span {
294     comp-user-span
295     comment "Tape-spanning non-root partitions on slow machines"
296     compress none
297 }
298
299
300 define dumptype comp-root {
301     global
302     comment "Root partitions with compression"
303     compress client fast
304     priority low
305 }
306
307 define dumptype nocomp-root {
308     comp-root
309     comment "Root partitions without compression"
310     compress none
311 }
312
313 define dumptype comp-high {
314     global
315     comment "very important partitions on fast machines"
316     compress client best
317     priority high
318 }
319
320 define dumptype nocomp-high {
321     comp-high
322     comment "very important partitions on slow machines"
323     compress none
324 }
325
326 define dumptype nocomp-test {
327     global
328     comment "test dump without compression, no /etc/dumpdates recording"
329     compress none
330     record no
331     priority medium
332 }
333
334 define dumptype comp-test {
335     nocomp-test
336     comment "test dump with compression, no /etc/dumpdates recording"
337     compress client fast
338 }
339
340 define dumptype nocomp-ssh {
341    root-tar
342    comment "ssh authorization and dumped with tar"
343    auth "ssh"
344    ssh_keys "/var/lib/amanda/.ssh/id_rsa_amdump"
345    compress none
346 }
347    
348
349 define dumptype custom-compress {
350    root-tar
351    comment "custom client compression, dumped with tar"
352    compress client custom
353    client_custom_compress "/usr/bin/bzip2"
354 }
355
356 # amcrypt requires aespipe and uuencode
357 define dumptype encrypt-fast {
358    root-tar
359    comment "fast client compression and server symmetric encryption, dumped with tar"
360    compress client fast
361    encrypt server
362    server_encrypt "/usr/sbin/amcrypt"
363    server_decrypt_option "-d"
364 }
365
366
367 # amcryptsimple use gpg symmetric encryption. gpg does compress with zlib by default.
368 # Thus, specify compress none.
369 define dumptype encrypt-simple-nocomp {
370    root-tar
371    comment "client simple symmetric encryption, dumped with tar"
372    compress none
373    encrypt client
374    client_encrypt "/usr/sbin/amcryptsimple"
375    client_decrypt_option "-d"
376 }
377
378 # To use gpg public-key encryption, gpg does compress with zlib by default.
379 # Thus, specify compress none.
380
381 define dumptype gpg-encrypt-nocomp {
382    root-tar
383    comment "server public-key encryption, dumped with tar"
384    compress none
385    encrypt server
386    server_encrypt "/usr/sbin/amgpgcrypt"
387    server_decrypt_option "-d"
388 }
389
390 # The following dumptypes are for ZMC
391 # dumptype gui-base defined in $config/amanda.conf
392
393 define dumptype gui-default {
394    gui-base
395    comment "gui default dumptype"
396    compress none
397    encrypt none
398 }
399
400 define dumptype gui-compress {
401    gui-base
402    comment "gui dumptype with compression"
403    compress client fast
404    encrypt none
405 }
406
407 define dumptype gui-encrypt {
408    gui-base
409    comment "gui dumptype with encryption"
410    compress none
411    encrypt server
412    server_encrypt "/usr/sbin/amcryptsimple"
413 }
414
415 define dumptype gui-encrypt-compress {
416    gui-base
417    comment "gui dumptype with compression and encryption"
418    compress client fast
419    encrypt server 
420    server_encrypt "/usr/sbin/amcryptsimple"
421 }