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