1DAR(1) General Commands Manual DAR(1)
2
3
4
6 dar - disk archive
7
9 dar [-c | -x | -l | -d | -t | -C | -+] [<path>/]<basename> [options]
10
11 dar -h
12
13 dar -V
14
16 dar is a full featured backup tool, aimed for disks (floppy, CD-R(W),
17 DVD-R(W), zip, jazz, etc.)
18
19
20 dar can store a backup in several files (called "slices" in the follow‐
21 ing) of a given size, eventually pausing or running a user com‐
22 mand/script before starting the next slice. This can allow for example,
23 the burning of the last generated slice on a CD-R, or changing a floppy
24 disk before continuing on the next one. Like its grand-brother, the
25 great "tar" command, dar may also use compression, at the difference
26 that compression is used inside the archive to be able to have com‐
27 pressed slices of the defined size. But the most important feature of
28 dar is its ability to make differential backups. In other words, back‐
29 ups that contain only new files or files that have changed from a
30 backup of reference. Moreover with differential backup, dar also
31 stores files that have been deleted since the backup of reference.
32 Thus, when restoring, first a full backup, then additional differential
33 backups, at each restoration you get the exact state of the filesystem
34 at the time of the backup. And of course, the reference backup may be a
35 full or a differential backup itself.
36
37 dar is the first backup program I know that can also remove files dur‐
38 ing restoration! By the way, in this document, "archive" and "backup"
39 mean the same thing, and are used interchangeably.
40
41 Unlike the tar command, dar is not suited for directly writing to
42 tapes. So keep using tar for tape archives. Because, even when using
43 dar to write a slice on a tape, you will loose all the interest of
44 another feature of dar which is its ability to directly access any of
45 the archived files, even when compression is used. This way, and in
46 contrast to the tar command, dar is able to extract a given file much
47 faster from a backup and to also recover files that follow a data cor‐
48 ruption (loosing only the file in which data corruption has occurred).
49
50 This, of course, has its limitations, in particular when data corrup‐
51 tion occurs in the vital part of the backup, i.e. the few first bytes
52 of each slice or the last part of the archive (the catalogue). In case
53 you need to store archives on a bad quality medium, you could protect
54 each slice with a Parchive recovery file. (see NOTES for more informa‐
55 tion about Parchive, and how to transparently run Parchive from dar)
56
57 Slices have a base name given on the command line, which is completed
58 by a dot, a number, a dot and the extension (dar) to form a filename.
59 On the command line you will never have to give the full file name of a
60 slice.
61
62 Let's take an example:
63 considering the base name "joe", dar will make one
64 or several slices during backup process. The file‐
65 names with of theses slices are: joe.1.dar
66 joe.2.dar ... joe.10.dar ... etc. If you want to
67 extract, list, or use this backup as reference, you
68 will only have to use the base name, which is the
69 string "joe" in this example.
70
71
73 COMMANDS:
74
75 Important note: Not all system actually support long options (Solaris,
76 FreeBSD, ...). For example --create will not be available on theses
77 systems, and you will have to use -c instead. In the same way, not all
78 system do support optional arguments (FreeBSD without GNU getopt for
79 example), you then need to explicitly give the argument, for example in
80 place of "-z" you will need to give "-z 9", see "EXPLICIT OPTIONAL
81 ARGUMENTS" paragraph near the end of this document.
82
83
84 -c, --create [<path>/]<basename>
85 creates a backup with the name based on <basename>.
86 All the slices will be created in the directory
87 <path> if specified, else in the current directory.
88 If the destination filesystem is too small to con‐
89 tain all the slices of the backup, the -p option
90 (pausing before starting new slices) might be of
91 interest. Else, in the case the filesystem is full,
92 dar will suspend the operation, asking for the user
93 to make free space, then continue its operation. To
94 make free space, the only thing you cannot do is to
95 touch the slice being written. If the filename is
96 "-" *and* no slice is asked for (no -s option) the
97 archive is produced on the standard output allowing
98 the user to send the resulting archive through a
99 pipe.
100
101 -x, --extract [<path>/]<basename>
102 extracts files from the given backup. Slices are
103 expected to be in the current directory or in the
104 directory given by <path>. It is also possible to
105 use symbolic links to gather slices that are not in
106 the same directory. Path may also point to a remov‐
107 able device (floppy, CD, etc.), in this case, to be
108 able to mount/unmount the device, you must not
109 launch dar from that directory. In other words, the
110 current directory must not be that directory (see
111 tutorial for details).
112
113 -l, --list [<path>/]<basename>
114 lists the contents of the given backup. In general
115 dar will only require the first and the last slice
116 of the archive.
117
118 -t, --test [<path>/]<basename>
119 checks the backup integrity. Even without compres‐
120 sion, dar is able to detect at least one error per
121 file in the archive, thanks to a 16 bits CRC
122 recorded per file in the catalogue. If one error
123 has occurred in a file stored in the archive, dar
124 will report it in 100% of all cases. If two errors
125 have occurred, dar will see them in 93,8% of the
126 cases. If three errors occurred, dar will see them
127 in 100% of the cases. If four errors have occurred,
128 dar will see them in 90.6% of the cases, etc.
129
130 -d, --diff [<path>/]<basename>
131 compares saved files in the backup with those in
132 the filesystem.
133
134 -C, --isolate [<path>/]<basename>
135 isolate a catalogue from its archive. The argument
136 is the basename of the file that will contain the
137 catalogue. The -A option is mandatory here to give
138 the name of the archive to extract the catalogue
139 from. Slicing is available (-s -S -p -b etc.). If
140 the filename is "-" *and* no slice is asked (no -s
141 option) the catalogue is produced on the standard
142 output, allowing the user to send the resulting
143 catalogue through a pipe. Note that there is no
144 difference in concept between a catalogue and an
145 archive. Thus you can do all operation on a cata‐
146 logue, in particular take it as reference for a
147 differential archive. A catalogue produced with -C
148 is just like a differential archive done right
149 after a full backup, (no data in it).
150
151 -+, --merge [<path>/]<basename>
152 create a subset archive from one or two existing
153 archives (the resulting archive name is the argu‐
154 ment to this command). The dar file selection mech‐
155 anism (see below) let the user decide which files
156 will be present in the resulting archive and which
157 one will be ignored. This option thus let the user
158 merge two archives in a single one (with a filter‐
159 ing mechanism that accepts all files), as well as
160 this option let the user create a smaller archive
161 which data is taken from one or two archives of
162 reference. Note that at no time the contents of the
163 archives of reference is extracted to real files
164 and directories: this is an archive to archive
165 transfer, thus you may lack support for Extended
166 Attribute while you will be able to fully manipu‐
167 late files with their Extended Attributes from one
168 archive to the resulting one. If the basename is
169 "-" *and* no slice is asked (no -s option), the ar‐
170 chive is produced on standard output allowing the
171 user to send the resulting archive through a pipe.
172 The first mandatory archive of reference if pro‐
173 vided thanks to the -A option, while the second
174 "auxiliary" (and optional) archive of reference is
175 provided thanks to the -@ option. Note that in the
176 current status, the resulting archive contains all
177 files from the mandatory archive of reference (that
178 matched the file selection mechanism) plus those
179 file of the auxiliary archive that are not already
180 present in the mandatory archive of reference. In
181 other words, no overwriting is possible, a more
182 complex way to solve conflicts will take place in a
183 future version. Last by default, archive data
184 selected for merging is uncompressed, and re-com‐
185 pressed. Thus the merging operation can be used to
186 change compression algorithm of given archive as
187 well as change its encryption. But, for better per‐
188 formance it is also possible thanks to the -ak
189 option (see below the -ak option for usage restric‐
190 tions) to merge files keeping them compressed, thus
191 no decompression/re-compression is performed at
192 all, which make the operation faster.
193
194 -h, --help displays help usage.
195
196 -V, --version displays version information.
197
198 GENERAL OPTIONS:
199
200 -v, --verbose[=s[kipped]]
201 verbose output. --verbose and --verbose=skipped are
202 independent. --verbose=skipped displays the files
203 being excluded by filters, while --verbose display
204 actions under process.
205
206 -b, --beep makes the terminal ring when user action is
207 required (like for example the creation of a new
208 slice using the -p option)
209
210 -n, --no-overwrite do not allow overwriting of any file or slice.
211
212 -w, --no-warn Do not warn before overwriting file or slice. By
213 default (no -n and no -w) overwriting is allowed
214 but a warning is issued before proceeding. This
215 option may receive 'a' as argument:
216
217 -wa, --no-warn=all This implies the -w option, and means that over
218 avoiding warning for file overwriting, DAR also
219 avoid signaling a file about to be removed when its
220 type is not the expected one. File are removed when
221 they have been recorded as deleted since the ar‐
222 chive of reference. At restoration of the differen‐
223 tial archive, if a file of the given name exists,
224 it is remove, but if the type does not match the
225 file that was present at the time of the archive of
226 reference (directory, plain file, fifo, socket,
227 char or block device, etc.), a warning is normally
228 issued to prevent the accidental removal of data
229 that was not saved in the backup of reference. (See
230 also -k option)
231
232 -R, --fs-root <path>
233 The path points to the directory tree containing
234 all the files that will be enrolled in the opera‐
235 tion (backup, restoration or comparison). By
236 default the current directory is used. All other
237 paths used in -P or -g options on the command line
238 are and must be relative to this path (or to cur‐
239 rent directory if -R is not present). Note that -R
240 is useless for testing (-t option) isolation (-C
241 option) and merging (-+ option)
242
243 -X, --exclude <mask>
244 The mask is a string with wild cards (like * and ?)
245 which is applied to filenames which are not direc‐
246 tories. If a given file matches the mask, it is
247 excluded from the operation. By default (no -X on
248 the command line), no file is excluded from the
249 operation. -X may be present several times on the
250 command line, in that case a file will not be con‐
251 sidered for the given operation if it matches at
252 least one -X mask.
253
254 -I, --include <mask>
255 The mask is applied to filenames which are not
256 directories. If a given file matches the mask and
257 does not match any mask given with -X, the file is
258 selected for the operation. By default (no -I and
259 no -X on the command line), all files are included
260 for the operation. -I may be present several times
261 on the command line, in that case all file that
262 match one of the -I mask will be considered for the
263 given operation, if they do not also match one of
264 the -X mask.
265
266 -P, --prune <path> Do not consider file or directory sub-tree given by
267 the path. -P may be present several time on the
268 command line. The difference with -X is that the
269 mask is not applied only to the filename, but also
270 include the path. Moreover it applies also to
271 directories (-X does not). By default (no -P on the
272 command-line), no sub-tree or file is excluded from
273 the operation, and all the directory tree (as indi‐
274 cated by -R option) is considered. Note that <path>
275 may contains wild-cards like * or ? see glob(7) man
276 page for more informations.
277
278 -g, --go-into <path>
279 Files or directory to only take in account, as
280 opposed to -P. -g may be present several time on
281 command-line. Same thing here, the difference with
282 -I is that the mask is applied to the path+filename
283 and also concerns directories. By default all files
284 under the -R directory are considered. Else, if one
285 or more -g option is given, just those are selected
286 (if they do not match any -P option). All paths
287 given this way must be relative to the -R direc‐
288 tory. This is equivalent as giving <path> out of
289 any option. Warning, -g option cannot receive
290 wild-cards, theses would not be interpreted.
291
292 -[, --include-from-file <listing_file>
293 Files listed in the listing file are included for
294 the operation. No wild card expression is inter‐
295 preted in the listing file, the null character is
296 not allowed and the carriage return is used to sep‐
297 arate file names (one file name per line). Note
298 that this option applies to any files and directory
299 exactly as -g does, with an important difference
300 however: -g option only uses relative paths to the
301 root directory (the directory given with the -R
302 option), while -[ can use absolute path as well.
303 You can thus generate a listing file with the 'find
304 / -print > somefile' command and give 'somefile' as
305 argument to -[ option. Note that however, dar will
306 not save files out of the -R given root directory
307 tree.
308
309 -], --exclude-from-file <listing_file>
310 Files listed in the listing file are excluded from
311 the operation. If a directory is listed in the file
312 all its contents is excluded (unless using ordered
313 method and another mask includes some of its sub‐
314 files or subdirectories). This option is the oppo‐
315 site of -[ and acts the same was as -P option does
316 (in particular it is compared to the whole
317 path+filename and applies to files and directo‐
318 ries). As for -[ option, -] listing file can con‐
319 tain absolute paths, but wild cards are not
320 expanded, neither.
321
322 File selection in brief:
323
324 As seen above, -I -X -P, -g, -[ and -] options are used to select the
325 files to operate on. -I and -X only use the name of files and do not
326 apply to directories, while -P, -g -[ and -] use the filename *and* the
327 path, they *do* apply to directories.
328
329 since version 2.2.0 two modes of interpretation of theses options
330 exist. The normal original method and the ordered method:
331
332 the normal method is the default:
333 A directory is elected for operation if no -P or -] option
334 excludes it. If at least one -g or -[ option is given one
335 command line, one -g option must cover it, else it is not
336 elected for operation. If a directory is not selected, no
337 recursion is done in it (the directory is pruned). For non
338 directories files, the same is true (P, -g, -[ and -] do
339 apply) and a second test must also be satisfied: no -X
340 option must exclude the filename, and if at least one -I
341 option is given, one must match the given filename (using
342 or not wild-cards).
343
344 the ordered method (when -am option is given on command-line):
345 The ordered method takes care of the order of presence
346 between -X and -I in one hand and of -P, -g, -[ and -] in
347 the other hand (note that it has also the same action con‐
348 cerning EA selection when using -u and -U options, but
349 that's no more file selection). In the ordered method the
350 last argument take precedence over all the previous ones,
351 let's take an example:
352
353 -X "*.mp?" -I "*.mp3" -I "toto*"
354 Here dar will include all files except file of name
355 "*.mp?" (those ending with "mpX" where X is any char‐
356 acter), but it will however include those ending with
357 ".mp3". It will also include files which name begin by
358 "toto" whatever they end with. This way, "toto.mp2"
359 will be saved (while it matches "*.mp?" it also begins
360 by "toto") as well as "toto.txt" as well as "joe.mp3"
361 (while it matches "*.mp?" it also ends by "mp3"). But
362 will not be saved "joe.mp2" (because it does not begin
363 by "toto", nor ends by "mp3", and match "*.mp?" mask).
364 As we see the last option (-I or -X) overcomes the
365 previous one. -P, -g, -[ and -] act together the same
366 but as seen above they do not only act on filename,
367 but on the whole path+filename. Note that (-g, -P, -[,
368 -]) and (-X , -I) are independent concerning their
369 relative order. You can mix -X -I -g -P -] -[ in any
370 order, what will be important is the relative posi‐
371 tions of -X options compared to -I options, and the
372 relative positions of -g -[ -] and -P options between
373 them.
374
375 In logical terms, if <prev_mask> is the mask generated by all
376 previous mask on the command line, -I <mask> generates the new
377 following mask: <prev_mask> or <mask> . While -X <mask> gener‐
378 ates the new following mask: <prev_mask> and not <mask>. This is
379 recursive each time you add a -I or -X option. Things work the
380 same with -P, -g, -[ and -] options.
381 This ends the file selection explication let's continue with other
382 options.
383
384 -u, --exclude-ea <mask>
385 Do not consider the Extended Attributes (EA) that
386 are matched by the given mask. By default, no EA
387 are excluded, if the support for EA has been acti‐
388 vated at compilation time. This option can be used
389 multiple times.
390
391 -U, --include-ea <mask>
392 Do only consider the EA that match the given mask.
393 By default, all EA are included if no -u or -U
394 option is present and if the support for EA has
395 been activated at compilation time. This option can
396 be used multiple times. See also the -am and -ae
397 options, they also apply to -U and -u options and
398 read below the Note concerning EA.
399
400 Note concerning Extended Attributes (EA)
401
402 Support for EA must be activated at compilation time (the con‐
403 figure script tries to do so if your system has all the required
404 support for that). Thus you can get two binaries of dar (of the
405 same version), one supporting EA and another which does not (dar
406 -V to see whether EA support is activated). The archives they
407 produce are the same and can be read by each other. The only
408 difference is that the binary without EA support is not able to
409 save or restore EAs, but is still able to test them and list
410 their presence.
411
412 Since version 2.3.x the name of EA include the namespace for dar
413 be able to consider any type of EA (not only "system" and "user"
414 as previously). Thus the two previous options -u and -U have
415 changed and now take an argument which is a mask applied to EA
416 names written in the following form namespace.name where "names‐
417 pace" is for example "user". Note that the mask may or may not
418 include the dot (.) and match arbitrary part of the EA names‐
419 pace+name, just remind that masks will be applied to the "names‐
420 pace.name" global string.
421
422 the -am flag here also enables the ordered method, for EA selec‐
423 tion too. The ordered versus normal method have been explained
424 above in the file selection note, with some examples using -X
425 and -I. Here this is the same with -U and -u, (just replace -X
426 by -u and -I by -U and remember that the corresponding mask will
427 apply to Extended Attribute selection in place of file selec‐
428 tion).
429
430 Another point, independently of the -am option the -ae option
431 can be used at restoration time only. If set, when a file is
432 about to be overwritten, all EA will be first erased before
433 restoring those selected for restoration in the archive (accord‐
434 ing to the -U and -u options given). If not set, the EA of the
435 existing file will be overwritten, those extra EA that are not
436 in the archive or are not selected for restoration in regard to
437 the -u and -U options will be preserved. If you have not used
438 any -u/-U option at backup time and want to restore from a set
439 of full/differential backups the EA exactly as the were you have
440 to use -ae for dar removes the EA that have been removed along
441 the time, else you could get an EA that has been removed in a
442 intermediate differential backup not been removed at restoration
443 time.
444
445 Last point the -acase and -an options alters the case sensitiv‐
446 ity of the -U and -u masks that follow them on the command-
447 line/included files as they do for -I, -X, -P, -g, -[ and -] as
448 well. Very last point ;-), by default during backup dar set back
449 the atime after having read each file (see -aa/-ac options),
450 this has as side effect to modify the ctime date of each file.
451 But ctime change is used by dar to detect EA changes. In brief,
452 the next time you backup a file that had to be read (thus which
453 contents changed), its EA will be saved even if they had not
454 changed. To avoid this slide effect, you can use the -ac option.
455 This ends the Extended Attribute selection explication let's continue
456 with other options.
457
458 -i, --input <path> is available when reading from pipe (basename is
459 "-" for -x, -l, -t, -d or for -A when -c, -C or -+
460 is used). When reading from pipe, standard input is
461 used, but with this option, the file <path> (usu‐
462 ally a named pipe) is used instead. This option is
463 to receive output from dar_slave program (see
464 doc/NOTES for examples of use).
465
466 -o, --output <path> is available when reading from pipe (basename is
467 "-" for -x, -l, -t, -d or for -A when -c, -C or -+
468 is used). When reading from pipe, standard output
469 is used to send request to dar_slave, but with this
470 option, the file <path> (usually a named pipe) is
471 used instead. When standard output is used, all
472 messages goes to standard error (not only interac‐
473 tive messages). See doc/NOTES for examples of use.
474
475 -O, --comparison-field[=<flag>]
476 When comparing with the archive of reference (-c
477 -A) during a differential backup, when extracting
478 (-x) or when comparing (-d) do only consider cer‐
479 tain fields. The available flags are:
480
481 ignore-owner all fields are considered except
482 ownership. This is useful when dar
483 is used by a non-privileged user. It
484 will not consider a file has changed
485 just because of a uid or gid mis‐
486 match and at restoration dar will
487 not even try to set the file owner‐
488 ship.
489
490 mtime only inode type and last modifica‐
491 tion date is considered as well as
492 inode specific attributes like file
493 size for plain files. Ownership is
494 ignored, permission is ignored. Dur‐
495 ing comparison, difference on owner‐
496 ship or permission is ignored and at
497 restoration time dar will not try to
498 set the inode permission and owner‐
499 ship.
500
501 inode-type Only the inode type is considered.
502 Ownership, permission and dates are
503 ignored. Inode specific attributes
504 are still considered (like file size
505 for plain files). Thus comparison
506 will ignore differences for owner‐
507 ship, permission, and dates and at
508 restoration dar will not try to set
509 the ownership, permission and dates.
510
511 When no flag is provided to this option, -O option acts as if the
512 "ignore-owner" flag was set, which is the behavior in older releases (<
513 2.3.0). Note also that for backward compatibility, --ignore-owner
514 option still exists and is now just an alias to the --comparison-
515 field=ignore-owner option. Of course if this option is not used, all
516 fields are used for comparison or restoration.
517
518 -H[num], --hour[=num]
519 if -H is used, two dates are considered equal if
520 they differ from a integer number of hours, and
521 that number is less than or equal to [num]. If not
522 specified num defaults to 1. This is used when mak‐
523 ing a differential backup, to compare last_modifi‐
524 cation date of inodes, and at restoration time if
525 the -r option (restore only more recent files) is
526 used. This is to workaround some filesystems (like
527 Samba filesystem) that seems to change the dates of
528 files after having gone from or to daylight saving
529 time (winter/summer time).
530
531 -E, --execute <string>
532 the string is a user command-line to be launched
533 between slices. For reading (thus using -t, -d, -l
534 or -x options), the command is executed before the
535 slice is read or even asked, for writing instead
536 (thus using -c, -C or -+ option), the command is
537 executed once the slice has been completed. Some
538 substitution string can be used in the string:
539
540 %% will be replaced by %
541
542 %p will be replaced by the slice path
543
544 %b will be replaced by the slice basename
545
546 %n will be replaced by the slice number (to
547 be read or just written). For reading,
548 dar often needs the last slice, but ini‐
549 tially it does not know its number. If it
550 cannot be found in the current directory,
551 the user command-line is then called with
552 %n equal to 0. This is a convenient way
553 to inform the user command to provide the
554 last slice. If after it is still not
555 present, dar asks the user (as usually)
556 with a message on the terminal. Once the
557 last slice is found, the user command-
558 line is called a second time, with %n
559 equal to the value of the last slice num‐
560 ber.
561
562 %e will be replaced by the slice extension
563 (always substituted by "dar")
564
565 %c will be replaced by the context. Actually
566 three possible values exist: "init",
567 "operation" and "last_slice". When read‐
568 ing an archive for (testing, extraction,
569 diff, listing, or while reading the ar‐
570 chive of reference, see below the -F
571 option), the "init" context takes place
572 from the beginning up to the time the
573 catalogue is retrieved. On a multiple
574 slice archive this correspond to the
575 first slice request and to the last slice
576 requests. After, that point comes the
577 "operation" context. While creating an
578 archive, the context is always "opera‐
579 tion" except when the last slice has been
580 created, in which case the context is set
581 to "last_slice".
582 Several -E option can be given, given commands will then be called in
583 the order they appear on the command line, and included files.
584
585 -F, --execute-ref <string>
586 same as -E but is applied between slices of the
587 reference archive (-A option).
588
589 -K, --key [[<algo>]:]<string>
590 encrypt/decrypt the archive using the <algo> cipher
591 with the <string> as pass phrase. An encrypted ar‐
592 chive can only be read if the same pass phrase is
593 given. Available ciphers are "blowfish" (alias
594 "bf") for strong encryption and "scrambling" (alias
595 "scram") for a very weak encryption. By default if
596 no <algo> or no ':' is given, the blowfish cipher
597 is assumed. If your password contains a column ':'
598 you need to specify the cipher to use (or at least
599 use the initial ':' which is equivalent to 'bf:').
600 If the <string> is empty the pass phrase will be
601 asked at execution time. Thus, the smallest argu‐
602 ment that -K can receive is ':' which means blow‐
603 fish cipher with the pass phrase asked at execution
604 time.
605
606 Note that giving the pass phrase as argument to -K (or -J see below)
607 may let other users learn pass phrase (thanks to the ps, or top program
608 for examples). It is thus wise to either use an empty pass which will
609 make dar ask the pass phrase at when needed, or use -K (or -J option)
610 from an Dar Command File (see -B option), assuming it has the appropri‐
611 ated permission to avoid other users reading it.
612
613 -J, --key-ref [[<algo>]:]<string>
614 same as -K but the given key is used to decrypt the
615 archive of reference (given with -A option).
616
617 -#, --crypto-block <size>
618 to be able to randomly access data in an archive,
619 it is not encrypted globally but block by block.
620 You can define the encryption block size thanks to
621 this argument which default to 10240 bytes. Note
622 that syntax used for -s option is also available
623 here. Note also that crypto-block is stored as a 32
624 bits integer thus value larger than 4GB will cause
625 an error. Note last, that the block size given here
626 must be provided when reading this resulting ar‐
627 chive (through the -* or -# options). If it is not
628 the correct one, the archive will not be possible
629 to decrypt, it is thus safe to keep the default
630 value (and not use at all the -# option).
631
632 -*, --crypto-block-ref <size>
633 same as --crypto-block but for the archive of ref‐
634 erence (same default value).
635
636 -B, --batch <filename>
637 You can put in the file any option or argument as
638 used on command line, that will be parsed as if
639 they were in place of the "-B <filename>" option.
640 This way you can overcome the command line size
641 limitation. Commands in the file may be disposed on
642 several lines, and -B option can also be used
643 inside files, leading a file to include other
644 files. But an error occurs in case of loop (a file
645 includes itself) and DAR aborts immediately. Com‐
646 ments are now allowed, and must start by a hash `#'
647 character on each line. Note that for a line to be
648 considered as comment the hash character must be
649 the first character of the line (space or tab can
650 still precede the hash). See Conditional Syntax
651 bellow for a more rich syntax in configuration
652 files.
653
654 -N, --noconf Do not try to read neither ~/.darrc nor /etc/darrc
655 configuration files. See files section bellow.
656
657 -e, --empty Do not perform any action (backup, restoration or
658 merging), displays all messages as if it was for
659 real ("dry run" action).
660
661 -aSI, --alter=SI[-unit[s]]
662 when using k M G T E Z Y prefixes to define a size,
663 use the SI meaning: multiple of 10^3 (a Mega is
664 1,000,000).
665
666 -abinary, --alter=binary[-unit[s]]
667 when using k M G T E Z Y prefixes to define a size,
668 use the historical computer science meaning: multi‐
669 ple of 2^10 (a Mega is 1,048,576).
670
671 The --alter=SI and --alter=binary options can be used several times on
672 the command line. They affect all prefixes which follow, even those
673 found in files included by the -B option, up to the next --alter=binary
674 or --alter=SI occurrence. Note that if in a file included by the -B
675 option, an --alter=binary or --alter=SI is encountered, it affects all
676 the following prefixes, even those outside the included files. For
677 example, when running with the parameters "-B some.dcf -s 1K", 1K may
678 be equal to 1000 or 1024, depending on --alter=binary or --alter=SI
679 being present in the some.dcf file. By default (before any
680 --alter=SI/binary option is reached), binary interpreration of prefixes
681 is done, for compatibility with older versions.
682
683 -Q Do not display an initial warning on stderr when
684 not launched from a terminal (when launched from a
685 cronjob for example). This means that all questions
686 to the user will be answered with 'no', which most
687 of the time will abort the program. Please note
688 that this option cannot be used in the configura‐
689 tion file, it must be given on the command line.
690 Since version 2.2.2, giving this option also forces
691 the non-interactive mode, even if dar is launched
692 from a terminal. This makes it possible for dar to
693 run in the background. When you do, it's recom‐
694 mended to redirect stdout and/or sterr to files.
695
696 -aa, --alter=atime when reading a filesystem, while doing a backup (-c
697 option) or comparing (-d option) by default dar
698 tries to be as much transparent as possible, and
699 set back the last access time (atime) of read files
700 and directories, as if they have not been read.
701 But, preserving atime of read files, make their
702 ctime to be changed (last inode change). There is
703 no possibility to preserve both atime and ctime. If
704 you want to overcome the default original behavior
705 of dar and want to keep ctime unchanged, the
706 --alter=atime is for you. Some security software
707 rely on the ctime to be preserved, some other soft‐
708 ware rely on the atime to be preserved like leafn‐
709 ode NNTP caching software.
710
711 -ac, --alter=ctime set back the date alteration to ctime (see
712 --alter=atime above), this is the default behavior.
713 The use of this switch is to override the -aa
714 option in dar configuration files or command-line
715 (see -B option). From -aa and -ac the one which is
716 last parsed from command-line or included files
717 takes the win.
718
719 -am, --alter=mask set the ordered mode for mask. This affects the way
720 -I and -X options are interpreted, as well as -g,
721 -P, -[ and -] options, -Z and -Y options and -U and
722 -u options. It can take any place on the command-
723 line and can be placed only once. See the file
724 selection in brief paragraph above for a detailed
725 explanation of this option.
726
727 -an, --alter=no-case
728 set the filters in case insensitive mode. This con‐
729 cerns only masks specified after this option (see
730 also -acase option below). This changes the behav‐
731 ior of -I, -X, -g, -P, -Z, -Y, -u and -U options.
732
733 -acase, --alter=case
734 set back to case sensitive mode for filters. All
735 following masks are case sensitive, up to end of
736 parsing or up to the next -an option. This changes
737 the behavior of -I, -X, -g, -P, -Z, -Y, -u and -U
738 options.
739
740 -ar, --alter=regex set the filters to be interpreted as regular
741 expressions (man regex(7) ) instead of the default
742 glob expression (man glob(7) ) This modifies the
743 -I, -X, -g, -P, -Z, -Y, -u and -U options that fol‐
744 lows up to an eventual -ag option (see just below).
745 Note that for -P and -g options, the given mask
746 matches the relative path part of the files path:
747 Let's take an example, assuming you have provided
748 /usr/local to the -R option, the mask "^foo$" will
749 replaced internally by "^/usr/local/foo$" while the
750 mask "foo$" will be replaced internally by
751 "^/usr/local/.*foo$".
752
753 -ag, --alter=glob This option returns to glob expressions mode (which
754 is the default) after an -ar option has been used,
755 this applies to any -I, -X, -g, -P, -Z, -Y, -u and
756 -U options that follow up to an eventual new -ar
757 option (see just above).
758
759 -j, --jog when virtual memory is exhausted, ask user to make
760 room before trying to continue. By default, when
761 memory is exhausted dar aborts. Note that on sev‐
762 eral system, when memory is exhausted the kernel is
763 likely to kill the process that failed to obtain
764 virtual memory, thus on some systems, dar may not
765 be able to ask user for what to do when memory is
766 exhausted.
767
768 SAVING, ISOLATION AND MERGING OPTIONS (to use with -c, -C or -+)
769
770 -z[level], --gzip[=level]
771 compresses within slices using gzip algorithm (if
772 not specified, no compression is performed). The
773 compression level (an integer from 1 to 9) is
774 optional, and is 9 by default, which is max com‐
775 pression/slow processing. At the opposite, 1 means
776 less compression and faster processing.
777
778 -y[level], --bzip2[=level]
779 compresses using bzip2 algorithm. See -z above for
780 usage details.
781
782 -s, --slice <number>
783 Size of the slices in bytes. If the number is
784 appended by k (or K), M, G, T, P E, Z or Y the size
785 is in kilobytes, megabytes, gigabytes, terabytes,
786 petabytes, exabytes, zettabytes or yottabytes
787 respectively. Example: "20M" means 20 megabytes, by
788 default, it is the same as giving 20971520 as argu‐
789 ment (see also -aSI and -abinary options). If -s is
790 not present the backup will be written to a single
791 slice whatever the size of the backup may be (there
792 is probably some filesystem limitation, thus you
793 might expect problems for file size over 2 giga‐
794 bytes, depending on your filesystem, but this is
795 not a limitation of dar).
796
797 -S, --first-slice <number>
798 -S gives the size of the first slice which may be
799 chosen independently of the size of following
800 slices. This option needs -s and by default, the
801 size of the first slice is the same as the one of
802 the following slices.
803
804 -p [<integer>], --pause[=<integer>]
805 pauses before writing to a new slice (this requires
806 -s). By default there is no pause, all slices are
807 written in the same directory, up to the end of the
808 backup or until the filesystem is full. In this
809 later case, the user is informed of the lack of
810 disk space and dar stops for user action. As soon
811 as some disk space is available, the user can con‐
812 tinue the backup. The optional integer that this
813 option can receive tells dar to only pause very 'n'
814 slice. Giving 3 for 'n' will make dar pause only
815 after slices 3, 6, 9 and so on. If this integer is
816 not specified, the behavior is as if '1' was given
817 as argument which makes dar pause after each slice.
818
819 -A, --ref [<path>]/<basename>
820 specifies the archive to use as reference (manda‐
821 tory with -C). By default (default is only possible
822 with -c option) no archive is used and all files
823 are saved (in regards to -I -X -P and -g options).
824 All slices of the reference backup are expected to
825 be on the same directory given by <path> or the
826 current directory by default. Usually only the
827 first and the last slice are required to extract
828 the catalogue of reference. If necessary the use of
829 symbolic links is also possible here to gather
830 slices that do not reside in the same directory.
831 You can also point <path> to a floppy or any other
832 mounted directory, because dar will pause and ask
833 the user for required slices if they are not
834 present. The argument to -A may be of four types:
835 - An existing archive basename, which will be
836 taken as reference
837 - a dash ("-") which implies the use of -o and -i
838 options, this allows the archive of reference to be
839 read from a pair of pipes with dar_slave at the
840 other ends. Dar_slave can be run through ssh on a
841 remote host for example.
842 - a plus sign ("+") which makes the reference be
843 the current directory status (not available with -+
844 option: merging). In other word, no file's data
845 will be saved, just the current status of the
846 inodes will be recorded in the catalogue. This is
847 like an extracted catalogue form a full backup, it
848 can be taken for further reference without having
849 to make the full backup itself. This feature is
850 known as the "snapshot" backup.
851 - a <date>, if -af option has been placed before
852 -A on the command-line (or in a included file, see
853 -B option). For more about that feature see -af
854 option below.
855
856 -@, --aux-ref [<path>]/<basename>
857 specifies an auxiliary archive of reference. This
858 option is only available with -+ option (merging).
859 Over -A option which is mandatory with -+ option,
860 you may give a second archive of reference thanks
861 to the -% option. This allows one to merge two ar‐
862 chive in a single one. See also -$, -~ and -% for
863 other options concerning auxiliary archive of ref‐
864 erence.
865
866 -$, --aux-key [[<algo>]:]<string>
867 same as -J but for the auxiliary archive of refer‐
868 ence (-@ option).
869
870 -~, --aux-execute <string>
871 same as -F but for the auxiliary archive of refer‐
872 ence (-@ option).
873
874 -%, --aux-crypto-block <size>
875 same as -* but for the auxiliary archive of refer‐
876 ence (-@ option).
877
878 -D, --empty-dir When excluding directories either explicitly using
879 -P or -] options, or implicitly by giving a -g or
880 -[ options (a directory is excluded if it does not
881 match mask given with -g options or -[ options) dar
882 does not store anything about theses. But with -D
883 option, dar stores them as empty directories. This
884 can be useful, if excluding a mount point (like
885 /proc or /dev/pts). At restoration time, dar will
886 then recreate theses directories (if necessary).
887 This option has no meaning with -C and is ignored
888 in that case.
889
890 -Z, --exclude-compression <mask>
891 Filenames covered by this mask are not compressed.
892 It is only useful with -z or -y. By default, all
893 file are compressed (if compression is used). This
894 option can be used several times, in that case a
895 file that matches one of the -Z mask will not be
896 compressed.
897
898 -Y, --include-compression <mask>
899 Filenames covered by this mask (and not covered by
900 -Z) are the only to be compressed. It is only
901 available with -z no -y. By default all files are
902 compressed. This option can be used several times,
903 in that case all files that match one of the -Y
904 will be compressed, if they do not also match on of
905 the -Z masks. The ordered method here applies too
906 when activated (with -am option), it works exactly
907 the same as -I and -X options, but apply to file
908 compression, not file selection.
909
910 -m, --mincompr <number>
911 files which size is below this value will not be
912 compressed. If -m is not specified it is equivalent
913 to giving -m 100 as argument. If you want to com‐
914 press all file whatever their size is you thus need
915 to type -m 0 on the command line. The same number
916 extensions as those used with -s or -S are avail‐
917 able here, if you want to specify the size in kilo‐
918 byte, megabyte, gigabyte etc.
919
920 -ak, --alter=keep-compressed
921 During merging operation, keep files compressed,
922 this has several restrictions : -z, -y, -Z, -Y, -m
923 are ignored, if two archives have to be merged,
924 both must use the same compression algorithm or one
925 of them must not use compression at all (this last
926 restriction will probably disappear in a next ver‐
927 sion). The advantage of this option is a greater
928 speed of execution (compression is usually CPU
929 intensive).
930
931 -af, --alter=fixed-date
932 Modify the -A option behavior, making it receiving
933 a <date> as argument in place of the
934 [<path>]/<basename> default argument. The <date> is
935 used to define which file to save (file which modi‐
936 fication is newer or equal to <date>) and which to
937 consider unchanged (those older than <date>). This
938 option has only a sense when creating an archive
939 (not when merging or isolating).
940
941 <date> must be a date in the following possible formats:
942 - a number of second since Jan 1st, 1970
943 - a date in the following form [[[year/]month/]day-]hour:minute[:sec‐
944 ond]
945
946 Here are some examples of date:
947 91836383927108078
948
949 2005/11/19-19:38:48 Which is 38 past 7 PM and 48 seconds, the
950 19th of November 2005
951
952 20:20 Which is 8 PM of the current day
953
954 2-00:08 Which is 8 past noon, the second day of the current
955 month
956
957 2/2-14:59 Which is 1 to 3 PM, the 2nd of February in the current
958 year
959
960 --nodump do not save files which have the 'd' flag set (see
961 chattr(1) lsattr(1) ext2 commands). This option may
962 not be available if the system dar has been com‐
963 piled on did not provide support for ext2 flags.
964 Note that this option does nothing with -+ option
965 (merging) as no filesystem is used for that opera‐
966 tion.
967
968 -G, --on-fly-isolate [<path>]/<basename>
969 When creating a backup (-c option) or merging two
970 backups (-+ option), -G option perform a catalogue
971 isolation of the resulting archive. This step is
972 done after the backup/merging has completed. The
973 on-fly isolation is compressed with bzip2 (using
974 compression level 9), and is a single sliced ar‐
975 chive without encryption. Due to command-line exi‐
976 guity, it is not possible to change compression
977 algo, slice size or encryption scheme for the on-
978 fly isolation. If you need a more complicated iso‐
979 lation, either look for a GUI over libdar, or do a
980 normal (not on-fly) isolation (By the way it is
981 possible to isolate an already isolated catalogue,
982 this is equivalent to a copy, but you can add
983 encryption, change compression, change slicing,
984 etc.), you can also use dar_xform if you only want
985 to change slices size (this is faster as no decom‐
986 pression/re-compression is done).
987
988 -M, --no-mount-points
989 stay in the same filesystem as the root directory
990 (see -R option), subdirectory that are mounting
991 points for other filesystems will not be saved or
992 saved empty if -D option is used (useless with -+
993 option)
994
995 -, , --cache-directory-tagging
996 don't save contents of directories that use the
997 Cache Directory Tagging Standard. See
998 http://www.brynosaurus.com/cachedir/spec.html for
999 details. (this option is useless with -+ option)
1000
1001 RESTORATION OPTIONS (to use with -x)
1002
1003 -k, --no-deleted Do not delete files that have been deleted since
1004 the backup of reference (file overwriting can still
1005 occur). By default, files that have been destroyed
1006 since the backup of reference are deleted during
1007 restoration, but a warning is issued before pro‐
1008 ceeding, except if -w is used. If -n is used, no
1009 file will be deleted (nor overwritten), thus -k is
1010 useless when using -n.
1011
1012 -r, --recent restore only files that are absent or more recent
1013 than those present in filesystem. -r is useless if
1014 -n is present.
1015
1016 -f, --flat do not restore directory structure. All file will
1017 be restored in the directory given to -R, if two
1018 files of the same name have to be restored, the
1019 usual scheme for warning (-w option) and overwrit‐
1020 ing (-n option) is used. No rename scheme is
1021 planned actually. When this option is set, dar does
1022 not remove files that have been stored as deleted
1023 since last backup. (-f implicitly implies -k).
1024
1025 -ae, --alter=erase_ea
1026 Drop all existing EA of files present in filesystem
1027 that will have to be restored. This way, the
1028 restored files will have the exact set of EA they
1029 had at the time of the backup. If this option is
1030 not given, a file to restore will have its EA over‐
1031 written by those present in the backup and if some
1032 extra EAs are present they will remain untouched.
1033 See the Note concerning Extended Attributes (EA)
1034 above for a detailed explanation about this behav‐
1035 ior.
1036
1037 TESTING AND DIFFERENCE OPTIONS (to use with -t or -d)
1038
1039 No specific option, but all general options are available except -n and
1040 -w which are useless, as testing and comparing only read data.
1041
1042 LISTING OPTIONS (to use with -l)
1043
1044 -T, --list-format=<normal | tree | xml>, --tree-format
1045 By default, listing provides a tar-like output (the
1046 'normal' output). You can however get a tree-like
1047 output (the 'tree' output) or an XML structured
1048 output (the 'xml' output). Providing -T without
1049 argument gives the same as providing the 'tree'
1050 argument to it. The option --tree-format is an
1051 alias to --list-format=tree (backward compatibil‐
1052 ity). Note that the files doc/dar-catalog-*.dtd
1053 define the format of the XML output listing (This
1054 file is also installed under $PREFIX/share/doc)
1055
1056 -as, --alter=saved list only saved files
1057
1058 -I and -X can be used to filter file to list base on their
1059 name (is ignored when --list-format=tree is used).
1060 Note that -P and -g options are not available while
1061 listing.
1062
1063 Else only -v and -b from general options are useful. Note that -v dis‐
1064 plays an archive summary first, where a lot of information about the
1065 archive can be obtained.
1066
1067 displayed fields
1068
1069 [data] possible values are [ ] or [Saved] or [InRef] .
1070 [ ] means that the data has not been saved
1071 because there is no change since backup of refer‐
1072 ence. [Saved] means that the data has been saved,
1073 and thus this archive is able to restore the file.
1074 [InRef] is used when isolating a catalogue from an
1075 archive and means that the file was saved in the
1076 reference archive.
1077
1078 [EA] possible values are " " (empty string) or [ ]
1079 or [InRef] or [Saved]. It Shows if Extended
1080 Attributes are present and saved ([Saved]), are
1081 present but not saved ([ ]) which means there
1082 is no change since backup of reference, or if there
1083 is no EA saved for this file (empty string).
1084 [InRef] is used when isolating a catalogue from an
1085 archive and means that the file was saved in the
1086 reference archive.
1087
1088 [compr] possible values are [....%] or [-----] or [ ]
1089 or [worse]. Shows if the file has been compressed
1090 and the compression rate reached ([...%]), or if
1091 the file is stored without compression ([ ] see
1092 -Y and -Z options) or if the file is not subject to
1093 compression because it is not a saved regular file
1094 ([----]), or if the file takes more space com‐
1095 pressed than its original size ([worse]), due to
1096 compression overhead.
1097
1098 permission
1099 see ls man page.
1100
1101 user owner of the file
1102
1103 group group owner of the file
1104
1105 size size in byte of the file (if compression is
1106 enabled, the real size in the archive is "compres‐
1107 sion rate" time smaller).
1108
1109 date the last modification date of the file. The last
1110 access time is also saved and restored, but not
1111 displayed.
1112
1113 filename The name of the file.
1114
1116 When dar has not been compiled with GNU getopt, which is not present by
1117 default on some systems like FreeBSD, you may lack the optional argu‐
1118 ments syntax. For example "-z" will create a parse error on command-
1119 line, or in -B configuration files. The solution is to explicitly give
1120 the argument. Here follows a list of explicit argument to use in place
1121 of optional ones:
1122
1123 -z must be replaced by -z 9
1124
1125 -y must be replaced by -y 9
1126
1127 -w must be replaced by -w d or -w default
1128
1129 -H must be replaced by -H 1
1130
1131 important ! When using GNU getopt(), optional arguments are available
1132 by sticking the argument to the short option: "-z" for example is
1133 available as well as "-z9". But "-z 9" is wrong, it will be read as
1134 "-z" option and "9", a command line argument (not an argument to the -z
1135 option). In the other side, when using a non GNU getopt this time, "-z"
1136 becomes an option that always requires an argument, and thus "-z 9" is
1137 read as "-z" option with "9" as argument, while "-z9" will be rejected
1138 as a unknown option, and "-z" alone will generate an error as no argu‐
1139 ment is provided. In consequences, you need a space between the option
1140 (like "-z") and its argument (like "9"), when dar does not rely on a
1141 GNU getopt() call, which also imply you to explicitly use arguments to
1142 options listed just above.
1143
1144
1146 dar exits with the following code:
1147
1148 0 Operation successful.
1149
1150 1 Syntax error on command-line.
1151
1152 2 Error due to a hardware problem or a lack of memory.
1153
1154 3 Detection of a condition that should never happen, and which
1155 is considered as a bug of the application.
1156
1157 4 Code issued when the user has aborted the program upon dar
1158 question from dar. This also happens when dar is not run from
1159 a terminal (for example launched from crontab) and dar has a
1160 question to the user. In that case, dar aborts the same way
1161 as if the user pressed the escape key at the question prompt.
1162
1163 5 is returned when an error concerning the treated data has
1164 been detected. While saving, this is the case when a file
1165 could not be opened or read. While restoring, it is the case
1166 when a file could not be created or replaced. While compar‐
1167 ing, it is the case when a file in the archive does not match
1168 the one in the filesystem. While testing, it is the case when
1169 a file is corrupted in the archive.
1170
1171 6 an error occurred while executing user command (given with -E
1172 or -F option). Mainly because the creation of a new process
1173 is not possible (process table is full) or the user command
1174 returned an error code (exit status different of zero).
1175
1176 7 an error has occurred when calling a libdar routine. This
1177 means the caller (dar program), did not respect the specifi‐
1178 cation of the API (and this can be considered as a particular
1179 case of a bug).
1180
1181 8 the version of dar used is based in finite length integers
1182 (it has been compiled with the option --enable-mode=...).
1183 This code is returned when an integer overflow occurred. use
1184 the full version (based in infinint) to avoid this error.
1185
1186 9 this code indicates an unknown error. I have probably forgot‐
1187 ten to update the exception caching code to take care of new
1188 exceptions... this is a minor bug you are welcome to report.
1189
1190 10 you have tried to use a feature that has been disabled at
1191 compilation time.
1192
1193 11 some saved files have changed while dar was reading them,
1194 this may lead the data saved for this file not correspond to
1195 a valid state for this file. For example, if the beginning
1196 and the end of the file have been modified at the same time
1197 (while dar is reading it), only the change at the end will be
1198 saved (the beginning has already been read), the resulting
1199 state of the file as recorded by dar has never existed and
1200 may cause problem to the application using it.
1201
1202
1204 If dar receives a signal (see kill(2) man page) it will take the
1205 default behavior which most of the time will abruptly abort the pro‐
1206 gram, except for the following signals:
1207
1208 SIGINT This signal is generated by the terminal when hitting CTRL-C
1209 (with the terminal's default settings), it can also be gener‐
1210 ated with the kill command
1211
1212 SIGTERM This signal is generated by the system when changing of run-
1213 level in particular when doing a shutdown, it can also be
1214 generated with the kill command
1215
1216 SIGHUP Depending on the system, this signal may be sent before the
1217 SIGTERM signal at shutdown time, it can also be generated
1218 with the kill command
1219
1220 SIGQUIT This signal is generated by the terminal when hitting CTRL-\
1221 (with the terminal's default settings), it can also be gener‐
1222 ated with the kill command
1223
1224 SIGUSR1 This signal can be generated by the kill command
1225
1226 SIGUSR2 This signal can be generated by the kill command
1227
1228
1229 For those previous signals, two behavior exit. For SIGHUP, SIGINT,
1230 SIGQUIT, SIGTERM and SIGUSR1, a delayed termination is done: the backup
1231 or isolation operation is stopped, the catalogue is appended to the ar‐
1232 chive and the archive is properly completed with the correct terminator
1233 string, this way the generated archive is usable, and can be used as
1234 reference for a differential backup at a later time. Note that if an
1235 on-fly isolation had been asked, it will *not* be performed, and no
1236 user command will be launched even if dar has been configured for (-E
1237 option). For SIGUSR2 instead a fast termination is done: in case of
1238 backup or isolation, the archive is not completed at all, only memory
1239 and mutex are released properly.
1240
1241 For both type of termination and other operations than backup or isola‐
1242 tion, dar's behavior is the same: For restoration, all opened directo‐
1243 ries are closed and permissions are set back to their original values
1244 (if they had to be changed for restoration). For listing, comparison,
1245 testing, the program aborts immediately.
1246
1247 Another point, when using one of the previous signals, dar will return
1248 with the exist status 4 meaning that the user has aborted the opera‐
1249 tion. Note that answering "no" to a question from dar may also lead dar
1250 to exit this way. last, If before the end of the program the same sig‐
1251 nal is received a second time, dar will abort immediately.
1252
1253
1255 $HOME/.darrc and /etc/darrc if present are read for configuration
1256 option. They share the same syntax as file given to -B option. If
1257 $HOME/.darrc is not present and only in that case, /etc/darrc is con‐
1258 sulted. You can still launch /etc/darrc from .darrc using a statement
1259 like -B /etc/darrc. None of theses file need to be present, but if
1260 they are they are parsed AFTER any option on the command line and AFTER
1261 included files from the command line (files given to the -B option).
1262 NOTE: if $HOME is not defined $HOME/.darrc default to /.darrc (at the
1263 root of the filesystem).
1264
1265 Else you can see conditional syntax bellow, and -N option above that
1266 leads dar to ignore the /etc/darrc and $HOME/.darrc files.
1267
1268
1270 configuration files (-B option, $HOME/.darrc and /etc/darrc) usually
1271 contain a simple list of command-line arguments, split or not over sev‐
1272 eral lines, and eventually mixed with comments (see -B option for
1273 more). But, you can also use make-like targets to ask for a particular
1274 set of commands to be used in certain conditions.
1275
1276 A condition takes the form of reserved word immediately followed by a
1277 colon ':'. This word + colon must stand alone on its line, eventually
1278 with spaces or tabs beside it. The available conditions are:
1279
1280 extract: all option listed after this condition get used if
1281 previously on command line or file the -x option
1282 has been used
1283
1284 create: all option listed after this condition get used if
1285 previously on command line or file (-B option) the
1286 -c option has been used
1287
1288 listing: (or list:) if -l option has been used
1289
1290 test: if -t option has been used
1291
1292 diff: if -d option has been used
1293
1294 isolate: if -C option has been used
1295
1296 merge: if -+ option has been used
1297
1298 all: in any case
1299
1300 default: if no -c, -d, -x, -t, -C, -l or -+ option has been
1301 used at this point of the parsing.
1302
1303 The condition stops when the next condition starts, or at End of File.
1304 The commands inserted before any condition are equivalent to those
1305 inserted after the "all:" condition. Remark : -c -d -x -t -C and -l are
1306 mutual exclusive, only one of them can be used while calling dar.
1307
1308 Here is an example of conditional syntax
1309
1310 create:
1311 # upon creation exclude the
1312 # following files from compression
1313 -Z "*.mp3" -Z "*.mpg"
1314
1315 all:
1316 -b
1317 -p
1318
1319 default:
1320 # this will get read if not
1321 # command has been set yet
1322 -V
1323 # thus by default dar shows its version
1324
1325 all:
1326 -v
1327 # for any command we also ask to be verbose
1328 # this is added to the previous all: condition
1329
1330 Last point, you may have several time the same condition (several all:
1331 ) for example. They will be concatenated together.
1332
1333
1335 dar_xform(1), dar_slave(1), dar_manager(1), dar_cp(1)
1336
1337 see also TUTORIAL and NOTES files in the documentation.
1338
1339
1341 dar cannot restore time of symbolic links. Many (all ?) UNIX do not
1342 provide any way to do that, the utime() system call changes the file
1343 pointed to by the link rather than the date of the link itself.
1344
1345 dar saves and restores atime and mtime, but cannot restore ctime (last
1346 inode change), there does not seems to be a standard call to do that
1347 under UNIX.
1348
1349
1351 http://dar.linux.free.fr/
1352 Denis Corbin
1353 France
1354 Europe
1355
1356
1357
13583rd Berkeley Distribution FEB 24th, 2007 DAR(1)