DAR

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXPLICIT OPTIONAL ARGUMENTS
EXIT CODES
SIGNALS
FILES
CONDITIONAL SYNTAX
SEE ALSO
KNOWN BUGS
AUTHOR

NAME

dar − disk archive

SYNOPSIS

dar [−c | −x | −l | −d | −t | −C | −+] [<path>/]<basename> [options]

dar −h

dar −V

DESCRIPTION

dar is a full featured backup tool, aimed for disks (floppy, CD−R(W), DVD−R(W), zip, jazz, etc.)

dar can store a backup in several files (called "slices" in the following) of a given size, eventually pausing or running a user command/script before starting the next slice. This can allow for example, the burning of the last generated slice on a CD−R, or changing a floppy disk before continuing on the next one. Like its grand−brother, the great "tar" command, dar may also use compression, at the difference that compression is used inside the archive to be able to have compressed slices of the defined size. But the most important feature of dar is its ability to make differential backups. In other words, backups that contain only new files or files that have changed from a backup of reference. Moreover with differential backup, dar also stores files that have been deleted since the backup of reference. Thus, when restoring, first a full backup, then additional differential backups, at each restoration you get the exact state of the filesystem at the time of the backup. And of course, the reference backup may be a full or a differential backup itself.

dar is the first backup program I know that can also remove files during restoration! By the way, in this document, "archive" and "backup" mean the same thing, and are used interchangeably.

Unlike the tar command, dar is not suited for directly writing to tapes. So keep using tar for tape archives. Because, even when using dar to write a slice on a tape, you will loose all the interest of another feature of dar which is its ability to directly access any of the archived files, even when compression is used. This way, and in contrast to the tar command, dar is able to extract a given file much faster from a backup and to also recover files that follow a data corruption (loosing only the file in which data corruption has occurred).

This, of course, has its limitations, in particular when data corruption occurs in the vital part of the backup, i.e. the few first bytes of each slice or the last part of the archive (the catalogue). In case you need to store archives on a bad quality medium, you could protect each slice with a Parchive recovery file. (see NOTES for more information about Parchive, and how to transparently run Parchive from dar)

Slices have a base name given on the command line, which is completed by a dot, a number, a dot and the extension (dar) to form a filename. On the command line you will never have to give the full file name of a slice.

Let’s take an example:

considering the base name "joe", dar will make one or several slices during backup process. The filenames with of theses slices are: joe.1.dar joe.2.dar ... joe.10.dar ... etc. If you want to extract, list, or use this backup as reference, you will only have to use the base name, which is the string "joe" in this example.

OPTIONS

COMMANDS:

Important note: Not all system actually support long options (Solaris, FreeBSD, ...). For example −−create will not be available on theses systems, and you will have to use −c instead. In the same way, not all system do support optional arguments (FreeBSD without GNU getopt for example), you then need to explicitly give the argument, for example in place of "−z" you will need to give "−z 9", see "EXPLICIT OPTIONAL ARGUMENTS" paragraph near the end of this document.

−c, −−create [<path>/]<basename>

creates a backup with the name based on <basename>. All the slices will be created in the directory <path> if specified, else in the current directory. If the destination filesystem is too small to contain all the slices of the backup, the −p option (pausing before starting new slices) might be of interest. Else, in the case the filesystem is full, dar will suspend the operation, asking for the user to make free space, then continue its operation. To make free space, the only thing you cannot do is to touch the slice being written. If the filename is "−" *and* no slice is asked for (no −s option) the archive is produced on the standard output allowing the user to send the resulting archive through a pipe.

−x, −−extract [<path>/]<basename>

extracts files from the given backup. Slices are expected to be in the current directory or in the directory given by <path>. It is also possible to use symbolic links to gather slices that are not in the same directory. Path may also point to a removable device (floppy, CD, etc.), in this case, to be able to mount/unmount the device, you must not launch dar from that directory. In other words, the current directory must not be that directory (see tutorial for details).

−l, −−list [<path>/]<basename>

lists the contents of the given backup. In general dar will only require the first and the last slice of the archive.

−t, −−test [<path>/]<basename>

checks the backup integrity. Even without compression, dar is able to detect at least one error per file in the archive, thanks to a 16 bits CRC recorded per file in the catalogue. If one error has occurred in a file stored in the archive, dar will report it in 100% of all cases. If two errors have occurred, dar will see them in 93,8% of the cases. If three errors occurred, dar will see them in 100% of the cases. If four errors have occurred, dar will see them in 90.6% of the cases, etc.

−d, −−diff [<path>/]<basename>

compares saved files in the backup with those in the filesystem.

−C, −−isolate [<path>/]<basename>

isolate a catalogue from its archive. The argument is the basename of the file that will contain the catalogue. The −A option is mandatory here to give the name of the archive to extract the catalogue from. Slicing is available (−s −S −p −b etc.). If the filename is "−" *and* no slice is asked (no −s option) the catalogue is produced on the standard output, allowing the user to send the resulting catalogue through a pipe. Note that there is no difference in concept between a catalogue and an archive. Thus you can do all operation on a catalogue, in particular take it as reference for a differential archive. A catalogue produced with −C is just like a differential archive done right after a full backup, (no data in it).

−+, −−merge [<path>/]<basename>

create a subset archive from one or two existing archives (the resulting archive name is the argument to this command). The dar file selection mechanism (see below) let the user decide which files will be present in the resulting archive and which one will be ignored. This option thus let the user merge two archives in a single one (with a filtering mechanism that accepts all files), as well as this option let the user create a smaller archive which data is taken from one or two archives of reference. Note that at no time the contents of the archives of reference is extracted to real files and directories: this is an archive to archive transfer, thus you may lack support for Extended Attribute while you will be able to fully manipulate files with their Extended Attributes from one archive to the resulting one. If the basename is "−" *and* no slice is asked (no −s option), the archive is produced on standard output allowing the user to send the resulting archive through a pipe. The first mandatory archive of reference if provided thanks to the −A option, while the second "auxiliary" (and optional) archive of reference is provided thanks to the −@ option. Note that in the current status, the resulting archive contains all files from the mandatory archive of reference (that matched the file selection mechanism) plus those file of the auxiliary archive that are not already present in the mandatory archive of reference. In other words, no overwriting is possible, a more complex way to solve conflicts will take place in a future version. Last by default, archive data selected for merging is uncompressed, and re−compressed. Thus the merging operation can be used to change compression algorithm of given archive as well as change its encryption. But, for better performance it is also possible thanks to the −ak option (see below the −ak option for usage restrictions) to merge files keeping them compressed, thus no decompression/re−compression is performed at all, which make the operation faster.

−h, −−help

displays help usage.

−V, −−version

displays version information.

GENERAL OPTIONS:

−v, −−verbose[=s[kipped]]

verbose output. −−verbose and −−verbose=skipped are independent. −−verbose=skipped displays the files being excluded by filters, while −−verbose display actions under process.

−b, −−beep

makes the terminal ring when user action is required (like for example the creation of a new slice using the −p option)

−n, −−no−overwrite

do not allow overwriting of any file or slice.

−w, −−no−warn

Do not warn before overwriting file or slice. By default (no −n and no −w) overwriting is allowed but a warning is issued before proceeding. This option may receive ’a’ as argument:

−wa, −−no−warn=all

This implies the −w option, and means that over avoiding warning for file overwriting, DAR also avoid signaling a file about to be removed when its type is not the expected one. File are removed when they have been recorded as deleted since the archive of reference. At restoration of the differential archive, if a file of the given name exists, it is remove, but if the type does not match the file that was present at the time of the archive of reference (directory, plain file, fifo, socket, char or block device, etc.), a warning is normally issued to prevent the accidental removal of data that was not saved in the backup of reference. (See also −k option)

−R, −−fs−root <path>

The path points to the directory tree containing all the files that will be enrolled in the operation (backup, restoration or comparison). By default the current directory is used. All other paths used in −P or −g options on the command line are and must be relative to this path (or to current directory if −R is not present). Note that −R is useless for testing (−t option) isolation (−C option) and merging (−+ option)

−X, −−exclude <mask>

The mask is a string with wild cards (like * and ?) which is applied to filenames which are not directories. If a given file matches the mask, it is excluded from the operation. By default (no −X on the command line), no file is excluded from the operation. −X may be present several times on the command line, in that case a file will not be considered for the given operation if it matches at least one −X mask.

−I, −−include <mask>

The mask is applied to filenames which are not directories. If a given file matches the mask and does not match any mask given with −X, the file is selected for the operation. By default (no −I and no −X on the command line), all files are included for the operation. −I may be present several times on the command line, in that case all file that match one of the −I mask will be considered for the given operation, if they do not also match one of the −X mask.

−P, −−prune <path>

Do not consider file or directory sub−tree given by the path. −P may be present several time on the command line. The difference with −X is that the mask is not applied only to the filename, but also include the path. Moreover it applies also to directories (−X does not). By default (no −P on the command−line), no sub−tree or file is excluded from the operation, and all the directory tree (as indicated by −R option) is considered. Note that <path> may contains wild−cards like * or ? see glob(7) man page for more informations.

−g, −−go−into <path>

Files or directory to only take in account, as opposed to −P. −g may be present several time on command−line. Same thing here, the difference with −I is that the mask is applied to the path+filename and also concerns directories. By default all files under the −R directory are considered. Else, if one or more −g option is given, just those are selected (if they do not match any −P option). All paths given this way must be relative to the −R directory. This is equivalent as giving <path> out of any option. Warning, −g option cannot receive wild−cards, theses would not be interpreted.

−[, −−include−from−file <listing_file>

Files listed in the listing file are included for the operation. No wild card expression is interpreted in the listing file, the null character is not allowed and the carriage return is used to separate file names (one file name per line). Note that this option applies to any files and directory exactly as −g does, with an important difference however: −g option only uses relative paths to the root directory (the directory given with the −R option), while −[ can use absolute path as well. Another difference is when the argument is a directory −g will include all the subdirectories under that directory, while when the same entry is found in a listing file given to −[ only that directory will be included, no subdirectory or subfile would be enrolled in the backup, with −[ you need to list the exact set of file you want to backup. You can thus generate a listing file with the ’find / −print > somefile’ command and give ’somefile’ as argument to −[ option. Note that however, dar will not save files out of the −R given root directory tree.

−], −−exclude−from−file <listing_file>

Files listed in the listing file are excluded from the operation. If a directory is listed in the file all its contents is excluded (unless using ordered method and another mask includes some of its subfiles or subdirectories). This option is the opposite of −[ and acts the same was as −P option does (in particular it is compared to the whole path+filename and applies to files and directories). As for −[ option, −] listing file can contain absolute paths, but wild cards are not expanded, neither.

File selection in brief:

As seen above, −I −X −P, −g, −[ and −] options are used to select the files to operate on. −I and −X only use the name of files and do not apply to directories, while −P, −g −[ and −] use the filename *and* the path, they *do* apply to directories.

since version 2.2.0 two modes of interpretation of theses options exist. The normal original method and the ordered method:

the normal method is the default:

A directory is elected for operation if no −P or −] option excludes it. If at least one −g or −[ option is given one command line, one −g option must cover it, else it is not elected for operation. If a directory is not selected, no recursion is done in it (the directory is pruned). For non directories files, the same is true (P, −g, −[ and −] do apply) and a second test must also be satisfied: no −X option must exclude the filename, and if at least one −I option is given, one must match the given filename (using or not wild−cards).

the ordered method (when −am option is given on command−line):

The ordered method takes care of the order of presence between −X and −I in one hand and of −P, −g, −[ and −] in the other hand (note that it has also the same action concerning EA selection when using −u and −U options, but that’s no more file selection). In the ordered method the last argument take precedence over all the previous ones, let’s take an example:

−X "*.mp?" −I "*.mp3" −I "toto*"

Here dar will include all files except file of name "*.mp?" (those ending with "mpX" where X is any character), but it will however include those ending with ".mp3". It will also include files which name begin by "toto" whatever they end with. This way, "toto.mp2" will be saved (while it matches "*.mp?" it also begins by "toto") as well as "toto.txt" as well as "joe.mp3" (while it matches "*.mp?" it also ends by "mp3"). But will not be saved "joe.mp2" (because it does not begin by "toto", nor ends by "mp3", and match "*.mp?" mask). As we see the last option (−I or −X) overcomes the previous one. −P, −g, −[ and −] act together the same but as seen above they do not only act on filename, but on the whole path+filename. Note that (−g, −P, −[, −]) and (−X , −I) are independent concerning their relative order. You can mix −X −I −g −P −] −[ in any order, what will be important is the relative positions of −X options compared to −I options, and the relative positions of −g −[ −] and −P options between them.

In logical terms, if <prev_mask> is the mask generated by all previous mask on the command line, −I <mask> generates the new following mask: <prev_mask> or <mask> . While −X <mask> generates the new following mask: <prev_mask> and not <mask>. This is recursive each time you add a −I or −X option. Things work the same with −P, −g, −[ and −] options.

This ends the file selection explication let’s continue with other options.

−u, −−exclude−ea <mask>

Do not consider the Extended Attributes (EA) that are matched by the given mask. By default, no EA are excluded, if the support for EA has been activated at compilation time. This option can be used multiple times.

−U, −−include−ea <mask>

Do only consider the EA that match the given mask. By default, all EA are included if no −u or −U option is present and if the support for EA has been activated at compilation time. This option can be used multiple times. See also the −am and −ae options, they also apply to −U and −u options and read below the Note concerning EA.

Note concerning Extended Attributes (EA)

Support for EA must be activated at compilation time (the configure script tries to do so if your system has all the required support for that). Thus you can get two binaries of dar (of the same version), one supporting EA and another which does not (dar −V to see whether EA support is activated). The archives they produce are the same and can be read by each other. The only difference is that the binary without EA support is not able to save or restore EAs, but is still able to test them and list their presence.

Since version 2.3.x the name of EA include the namespace for dar be able to consider any type of EA (not only "system" and "user" as previously). Thus the two previous options −u and −U have changed and now take an argument which is a mask applied to EA names written in the following form namespace.name where "namespace" is for example "user". Note that the mask may or may not include the dot (.) and match arbitrary part of the EA namespace+name, just remind that masks will be applied to the "namespace.name" global string.

the −am flag here also enables the ordered method, for EA selection too. The ordered versus normal method have been explained above in the file selection note, with some examples using −X and −I. Here this is the same with −U and −u, (just replace −X by −u and −I by −U and remember that the corresponding mask will apply to Extended Attribute selection in place of file selection).

Another point, independently of the −am option the −ae option can be used at restoration time only. If set, when a file is about to be overwritten, all EA will be first erased before restoring those selected for restoration in the archive (according to the −U and −u options given). If not set, the EA of the existing file will be overwritten, those extra EA that are not in the archive or are not selected for restoration in regard to the −u and −U options will be preserved. If you have not used any −u/−U option at backup time and want to restore from a set of full/differential backups the EA exactly as the were you have to use −ae for dar removes the EA that have been removed along the time, else you could get an EA that has been removed in a intermediate differential backup not been removed at restoration time.

Last point the −acase and −an options alters the case sensitivity of the −U and −u masks that follow them on the command−line/included files as they do for −I, −X, −P, −g, −[ and −] as well. Very last point ;−), by default during backup dar set back the atime after having read each file (see −aa/−ac options), this has as side effect to modify the ctime date of each file. But ctime change is used by dar to detect EA changes. In brief, the next time you backup a file that had to be read (thus which contents changed), its EA will be saved even if they had not changed. To avoid this slide effect, you can use the −ac option.

This ends the Extended Attribute selection explication let’s continue with other options.

−i, −−input <path>

is available when reading from pipe (basename is "−" for −x, −l, −t, −d or for −A when −c, −C or −+ is used). When reading from pipe, standard input is used, but with this option, the file <path> (usually a named pipe) is used instead. This option is to receive output from dar_slave program (see doc/NOTES for examples of use).

−o, −−output <path>

is available when reading from pipe (basename is "−" for −x, −l, −t, −d or for −A when −c, −C or −+ is used). When reading from pipe, standard output is used to send request to dar_slave, but with this option, the file <path> (usually a named pipe) is used instead. When standard output is used, all messages goes to standard error (not only interactive messages). See doc/NOTES for examples of use.

−O, −−comparison−field[=<flag>]

When comparing with the archive of reference (−c −A) during a differential backup, when extracting (−x) or when comparing (−d) do only consider certain fields. The available flags are:

ignore−owner

all fields are considered except ownership. This is useful when dar is used by a non−privileged user. It will not consider a file has changed just because of a uid or gid mismatch and at restoration dar will not even try to set the file ownership.

mtime

only inode type and last modification date is considered as well as inode specific attributes like file size for plain files. Ownership is ignored, permission is ignored. During comparison, difference on ownership or permission is ignored and at restoration time dar will not try to set the inode permission and ownership.

inode−type

Only the inode type is considered. Ownership, permission and dates are ignored. Inode specific attributes are still considered (like file size for plain files). Thus comparison will ignore differences for ownership, permission, and dates and at restoration dar will not try to set the ownership, permission and dates.

When no flag is provided to this option, −O option acts as if the "ignore−owner" flag was set, which is the behavior in older releases (< 2.3.0). Note also that for backward compatibility, −−ignore−owner option still exists and is now just an alias to the −−comparison−field=ignore−owner option. Of course if this option is not used, all fields are used for comparison or restoration.

−H[num], −−hour[=num]

if −H is used, two dates are considered equal if they differ from a integer number of hours, and that number is less than or equal to [num]. If not specified num defaults to 1. This is used when making a differential backup, to compare last_modification date of inodes, and at restoration time if the −r option (restore only more recent files) is used. This is to workaround some filesystems (like Samba filesystem) that seems to change the dates of files after having gone from or to daylight saving time (winter/summer time).

−E, −−execute <string>

the string is a user command−line to be launched between slices. For reading (thus using −t, −d, −l or −x options), the command is executed before the slice is read or even asked, for writing instead (thus using −c, −C or −+ option), the command is executed once the slice has been completed. Some substitution string can be used in the string:

%%

will be replaced by %

%p

will be replaced by the slice path

%b

will be replaced by the slice basename

%n

will be replaced by the slice number (to be read or just written). For reading, dar often needs the last slice, but initially it does not know its number. If it cannot be found in the current directory, the user command−line is then called with %n equal to 0. This is a convenient way to inform the user command to provide the last slice. If after it is still not present, dar asks the user (as usually) with a message on the terminal. Once the last slice is found, the user command−line is called a second time, with %n equal to the value of the last slice number.

%e

will be replaced by the slice extension (always substituted by "dar")

%c

will be replaced by the context. Actually three possible values exist: "init", "operation" and "last_slice". When reading an archive for (testing, extraction, diff, listing, or while reading the archive of reference, see below the −F option), the "init" context takes place from the beginning up to the time the catalogue is retrieved. On a multiple slice archive this correspond to the first slice request and to the last slice requests. After, that point comes the "operation" context. While creating an archive, the context is always "operation" except when the last slice has been created, in which case the context is set to "last_slice".

Several −E option can be given, given commands will then be cast also ends by "mp3"). But will not be saved "joe.mp2" (because it does not begin by "toto", nor ends by "mp3", and match "*.mp?" mask). As we see the last option (−I or −X) overcomes the previous one. −P, −g, −[ and −] act together the same but as seen above they do not only act on filename, but on the whole path+filename. Note that (−g, −P, −[, −]) and (−X , −I) are independent concerning their relative order. You can mix −X −I −g −P −] −[ in any order, what will be important is the relative positions of −X options compared to −I options, and the relative positions of −g −[ −] and −P options between them.

In logical terms, if <prev_mask> is the mask generated by all previous mask on the command line, −I <mask> generates the new following mask: <prev_mask> or <mask> . While −X <mask> generates the new following mask: <prev_mask> and not <mask>. This is recursive each time you add a −I or −X option. Things work the same with −P, −g, −[ and −] options.

This ends the file selection explication let’s continue with other options.

−u, −−exclude−ea <mask>

Do not consider the Extended Attributes (EA) that are matched by the given mask. By default, no EA are excluded, if the support for EA has been activated at compilation time. This option can be used multiple times.

−U, −−include−ea <mask>

Do only consider the EA that match the given mask. By default, all EA are included if no −u or −U option is present and if the support for EA has been activated at compilation time. This option can be used multiple times. See also the −am and −ae options, they also apply to −U and −u options and read below the Note concerning EA.

Note concerning Extended Attributes (EA)

Support for EA must be activated at compilation time (the configure script tries to do so if your system has all the required support for that). Thus you can get two binaries of dar (of the same version), one supporting EA and another which does not (dar −V to see whether EA support is activated). The archives they produce are the same and can be read by each other. The only difference is that the binary without EA support is not able to save or restore EAs, but is still able to test them and list their presence.

Since version 2.3.x the name of EA include the namespace for dar be able to consider any type of EA (not only "system" and "user" as previously). Thus the two previous options −u and −U have changed and now take an argument which is a mask applied to EA names written in the following form namespace.name where "namespace" is for example "user". Note that the mask may or may not include the dot (.) and match arbitrary part of the EA namespace+name, just remind that masks will be applied to the "namespace.name" global string.

the −am flag here also enables the ordered method, for EA selection too. The ordered versus normal method have been explained above in the file selection note, with some examples using −X and −I. Here this is the same with −U and −u, (just replace −X by −u and −I by −U and remember that the corresponding mask will apply to Extended Attribute selection in place of file selection).

Another point, independently of the −am option the −ae option can be used at restoration time only. If set, when a file is about to be overwritten, all EA will be first erased before restoring those selected for restoration in the archive (according to the −U and −u options given). If not set, the EA of the existing file will be overwritten, those extra EA that are not in the archive or are not selected for restoration in regard to the −u and −U options will be preserved. If you have not used any −u/−U option at backup time and want to restore from a set of full/differential backups the EA exactly as the were you have to use −ae for dar removes the EA that have been removed along the time, else you could get an EA that has been removed in a intermediate differential backup not been removed at restoration time.

Last point the −acase and −an options alters the case sensitivity of the −U and −u masks that follow them on the command−line/included files as they do for −I, −X, −P, −g, −[ and −] as well. Very last point ;−), by default during backup dar set back the atime after having read each file (see −aa/−ac options), this has as side effect to modify the ctime date of each file. But ctime change is used by dar to detect EA changes. In brief, the next time you backup a file that had to be read (thus which contents changed), its EA will be saved even if they had not changed. To avoid this slide effect, you can use the −ac option.

This ends the Extended Attribute selection explication let’s continue with other options.

−i, −−input <path>

is available when reading from pipe (basename is "−" for −x, −l, −t, −d or for −A when −c, −C or −+ is used). When reading from pipe, standard input is used, but with this option, the file <path> (usually a named pipe) is used instead. This option is to receive output from dar_slave program (see doc/NOTES for examples of use).

−o, −−output <path>

is available when reading from pipe (basename is "−" for −x, −l, −t, −d or for −A when −c, −C or −+ is used). When reading from pipe, standard output is used to send request to dar_slave, but with this option, the file <path> (usually a named pipe) is used instead. When standard output is used, all messages goes to standard error (not only interactive messages). See doc/NOTES for examples of use.

−O, −−comparison−field[=<flag>]

When comparing with the archive of reference (−c −A) during a differential backup, when extracting (−x) or when comparing (−d) do only consider certain fields. The available flags are:

ignore−owner

all fields are considered except ownership. This is useful when dar is used by a non−privileged user. It will not consider a file has changed just because of a uid or gid mismatch and at restoration dar will not even try to set the file ownership.

mtime

only inode type and last modification date is considered as well as inode specific attributes like file size for plain files. Ownership is ignored, permission is ignored. During comparison, difference on ownership or permission is ignored and at restoration time dar will not try to set the inode permission and ownership.

inode−type

Only the inode type is considered. Ownership, permission and dates are ignored. Inode specific attributes are still considered (like file size for plain files). Thus comparison will ignore differences for ownership, permission, and dates and at restoration dar will not try to set the ownership, permission and dates.

When no flag is provided to this option, −O option acts as if the "ignore−owner" flag was set, which is the behavior in older releases (< 2.3.0). Note also that for backward compatibility, −−ignore−owner option still exists and is now just an alias to the −−comparison−field=ignore−owner option. Of course if this option is not used, all fields are used for comparison or restoration.

−H[num], −−hour[=num]

if −H is used, two dates are considered equal if they differ from a integer number of hours, and that number is less than or equal to [num]. If not specified num defaults to 1. This is used when making a differential backup, to compare last_modification date of inodes, and at restoration time if the −r option (restore only more recent files) is used. This is to workaround some filesystems (like Samba filesystem) that seems to change the dates of files after having gone from or to daylight saving time (winter/summer time).

−E, −−execute <string>

the string is a user command−line to be launched between slices. For reading (thus using −t, −d, −l or −x options), the command is executed before the slice is read or even asked, for writing instead (thus using −c, −C or −+ option), the command is executed once the slice has been completed. Some substitution string can be used in the string:

%%

will be replaced by %

%p

will be replaced by the slice path

%b

will be replaced by the slice basename

%n

will be replaced by the slice number (to be read or just written). For reading, dar often needs the last slice, but initially it does not know its number. If it cannot be found in the current directory, the user command−line is then called with %n equal to 0. This is a convenient way to inform the user command to provide the last slice. If after it is still not present, dar asks the user (as usually) with a message on the terminal. Once the last slice is found, the user command−line is called a second time, with %n equal to the value of the last slice number.

%e

will be replaced by the slice extension (always substituted by "dar")

%c

will be replaced by the context. Actually three possible values exist: "init", "operation" and "last_slice". When reading an archive for (testing, extraction, diff, listing, or while reading the archive of reference, see below the −F option), the "init" context takes place from the beginning up to the time the catalogue is retrieved. On a multiple slice archive this correspond to the first slice request and to the last slice requests. After, that point comes the "operation" context. While creating an archive, the context is always "operation" except when the last slice has been created, in which case the context is set to "last_slice".

Several −E option can be given, given commands will then be cast also ends by "mp3"). But will not be saved "joe.mp2" (because it does not begin by "toto", nor ends by "mp3", and match "*.mp?" mask). As we see the last option (−I or −X) overcomes the previous one. −P, −g, −[ and −] act together the same but as seen above they do not only act on filename, but on the whole path+filename. Note that (−g, −P, −[, −]) and (−X , −I) are independent concerning their relative order. You can mix −X −I −g −P −] −[ in any order, what will be important is the relative positions of −X options compared to −I options, and the relative positions of −g −[ −] and −P options between them.

In logical terms, if <prev_mask> is the mask generated by all previous mask on the command line, −I <mask> generates the new following mask: <prev_mask> or <mask> . While −X <mask> generates the new following mask: <prev_mask> and not <mask>. This is recursive each time you add a −I or −X option. Things work the same with −P, −g, −[ and −] options.

This ends the file selection explication let’s continue with other options.

−u, −−exclude−ea <mask>

Do not consider the Extended Attributes (EA) that are matched by the given mask. By default, no EA are excluded, if the support for EA has been activated at compilation time. This option can be used multiple times.

−U, −−include−ea <mask>

Do only consider the EA that match the given mask. By default, all EA are included if no −u or −U option is present and if the support for EA has been activated at compilation time. This option can be used multiple times. See also the −am and −ae options, they also apply to −U and −u options and read below the Note concerning EA.

Note concerning Extended Attributes (EA)

Support for EA must be activated at compilation time (the configure script tries to do so if your system has all the required support for that). Thus you can get two binaries of dar (of the same version), one supporting EA and another which does not (dar −V to see whether EA support is activated). The archives they produce are the same and can be read by each other. The only difference is that the binary without EA support is not able to save or restore EAs, but is still able to test them and list their presence.

Since version 2.3.x the name of EA include the namespace for dar be able to consider any type of EA (not only "system" and "user" as previously). Thus the two previous options −u and −U have changed and now take an argument which is a mask applied to EA names written in the following form namespace.name where "namespace" is for example "user". Note that the mask may or may not include the dot (.) and match arbitrary part of the EA namespace+name, just remind that masks will be applied to the "namespace.name" global string.

the −am flag here also enables the ordered method, for EA selection too. The ordered versus normal method have been explained above in the file selection note, with some examples using −X and −I. Here this is the same with −U and −u, (just replace −X by −u and −I by −U and remember that the corresponding mask will apply to Extended Attribute selection in place of file selection).

Another point, independently of the −am option the −ae option can be used at restoration time only. If set, when a file is about to be overwritten, all EA will be first erased before restoring those selected for restoration in the archive (according to the −U and −u options given). If not set, the EA of the existing file will be overwritten, those extra EA that are not in the archive or are not selected for restoration in regard to the −u and −U options will be preserved. If you have not used any −u/−U option at backup time and want to restore from a set of full/differential backups the EA exactly as the were you have to use −ae for dar removes the EA that have been removed along the time, else you could get an EA that has been removed in a intermediate differential backup not been removed at restoration time.

Last point the −acase and −an options alters the case sensitivity of the −U and −u masks that follow them on the command−line/included files as they do for −I, −X, −P, −g, −[ and −] as well. Very last point ;−), by default during backup dar set back the atime after having read each file (see −aa/−ac options), this has as side effect to modify the ctime date of each file. But ctime change is used by dar to detect EA changes. In brief, the next time you backup a file that had to be read (thus which contents changed), its EA will be saved even if they had not changed. To avoid this slide effect, you can use the −ac option.

This ends the Extended Attribute selection explication let’s continue with other options.

−i, −−input <path>

is available when reading from pipe (basename is "−" for −x, −l, −t, −d or for −A when −c, −C or −+ is used). When reading from pipe, standard input is used, but with this option, the file <path> (usually a named pipe) is used instead. This option is to receive output from dar_slave program (see doc/NOTES for examples of use).

−o, −−output <path>

is available when reading from pipe (basename is "−" for −x, −l, −t, −d or for −A when −c, −C or −+ is used). When reading from pipe, standard output is used to send request to dar_slave, but with this option, the file <path> (usually a named pipe) is used instead. When standard output is used, all messages goes to standard error (not only interactive messages). See doc/NOTES for examples of use.

−O, −−comparison−field[=<flag>]

When comparing with the archive of reference (−c −A) during a differential backup, when extracting (−x) or when comparing (−d) do only consider certain fields. The available flags are:

ignore−owner

all fields are considered except ownership. This is useful when dar is used by a non−privileged user. It will not consider a file has changed just because of a uid or gid mismatch and at restoration dar will not even try to set the file ownership.

mtime

only inode type and last modification date is considered as well as inode specific attributes like file size for plain files. Ownership is ignored, permission is ignored. During comparison, difference on ownership or permission is ignored and at restoration time dar will not try to set the inode permission and ownership.

inode−type

Only the inode type is considered. Ownership, permission and dates are ignored. Inode specific attributes are still considered (like file size for plain files). Thus comparison will ignore differences for ownership, permission, and dates and at restoration dar will not try to set the ownership, permission and dates.

When no flag is provided to this option, −O option acts as if the "ignore−owner" flag was set, which is the behavior in older releases (< 2.3.0). Note also that for backward compatibility, −−ignore−owner option still exists and is now just an alias to the −−comparison−field=ignore−owner option. Of course if this option is not used, all fields are used for comparison or restoration.

−H[num], −−hour[=num]

if −H is used, two dates are considered equal if they differ from a integer number of hours, and that number is less than or equal to [num]. If not specified num defaults to 1. This is used when making a differential backup, to compare last_modification date of inodes, and at restoration time if the −r option (restore only more recent files) is used. This is to workaround some filesystems (like Samba filesystem) that seems to change the dates of files after having gone from or to daylight saving time (winter/summer time).

−E, −−execute <string>

the string is a user command−line to be launched between slices. For reading (thus using −t, −d, −l or −x options), the command is executed before the slice is read or even asked, for writing instead (thus using −c, −C or −+ option), the command is executed once the slice has been completed. Some substitution string can be used in the string:

%%

will be replaced by %

%p

will be replaced by the slice path

%b

will be replaced by the slice basename

%n

will be replaced by the slice number (to be read or just written). For reading, dar often needs the last slice, but initially it does not know its number. If it cannot be found in the current directory, the user command−line is then called with %n equal to 0. This is a convenient way to inform the user command to provide the last slice. If after it is still not present, dar asks the user (as usually) with a message on the terminal. Once the last slice is found, the user command−line is called a second time, with %n equal to the value of the last slice number.

%e

will be replaced by the slice extension (always substituted by "dar")

%c

will be replaced by the context. Actually three possible values exist: "init", "operation" and "last_slice". When reading an archive for (testing, extraction, diff, listing, or while reading the archive of reference, see below the −F option), the "init" context takes place from the beginning up to the time the catalogue is retrieved. On a multiple slice archive this correspond to the first slice request and to the last slice requests. After, that point comes the "operation" context. While creating an archive, the context is always "operation" except when the last slice has been created, in which case the context is set to "last_slice".

Several −E option can be given, given commands will then be cast also ends by "mp3"). But will not be saved "joe.mp2" (because it does not begin by "toto", nor ends by "mp3", and match "*.mp?" mask). As we see the last option (−I or −X) overcomes the previous one. −P, −g, −[ and −] act together the same but as seen above they do not only act on filename, but on the whole path+filename. Note that (−g, −P, −[, −]) and (−X , −I) are independent concerning their relative order. You can mix −X −I −g −P −] −[ in any order, what will be important is the relative positions of −X options compared to −I options, and the relative positions of −g −[ −] and −P options between them.

In logical terms, if <prev_mask> is the mask generated by all previous mask on the command line, −I <mask> generates the new following mask: <prev_mask> or <mask> . While −X <mask> generates the new following mask: <prev_mask> and not <mask>. This is recursive each time you add a −I or −X option. Things work the same with −P, −g, −[ and −] options.

This ends the file selection explication let’s continue with other options.

−u, −−exclude−ea <mask>

Do not consider the Extended Attributes (EA) that are matched by the given mask. By default, no EA are excluded, if the support for EA has been activated at compilation time. This option can be used multiple times.

−U, −−include−ea <mask>

Do only consider the EA that match the given mask. By default, all EA are included if no −u or −U option is present and if the support for EA has been activated at compilation time. This option can be used multiple times. See also the −am and −ae options, they also apply to −U and −u options and read below the Note concerning EA.

Note concerning Extended Attributes (EA)

Support for EA must be activated at compilation time (the configure script tries to do so if your system has all the required support for that). Thus you can get two binaries of dar (of the same version), one supporting EA and another which does not (dar −V to see whether EA support is activated). The archives they produce are the same and can be read by each other. The only difference is that the binary without EA support is not able to save or restore EAs, but is still able to test them and list their presence.

Since version 2.3.x the name of EA include the namespace for dar be able to consider any type of EA (not only "system" and "user" as previously). Thus the two previous options −u and −U have changed and now take an argument which is a mask applied to EA names written in the following form namespace.name where "namespace" is for example "user". Note that the mask may or may not include the dot (.) and match arbitrary part of the EA namespace+name, just remind that masks will be applied to the "namespace.name" global string.

the −am flag here also enables the ordered method, for EA selection too. The ordered versus normal method have been explained above in the file selection note, with some examples using −X and −I. Here this is the same with −U and −u, (just replace −X by −u and −I by −U and remember that the corresponding mask will apply to Extended Attribute selection in place of file selection).

Another point, independently of the −am option the −ae option can be used at restoration time only. If set, when a file is about to be overwritten, all EA will be first erased before restoring those selected for restoration in the archive (according to the −U and −u options given). If not set, the EA of the existing file will be overwritten, those extra EA that are not in the archive or are not selected for restoration in regard to the −u and −U options will be preserved. If you have not used any −u/−U option at backup time and want to restore from a set of full/differential backups the EA exactly as the were you have to use −ae for dar removes the EA that have been removed along the time, else you could get an EA that has been removed in a intermediate differential backup not been removed at restoration time.

Last point the −acase and −an options alters the case sensitivity of the −U and −u masks that follow them on the command−line/included files as they do for −I, −X, −P, −g, −[ and −] as well. Very last point ;−), by default during backup dar set back the atime after having read each file (see −aa/−ac options), this has as side effect to modify the ctime date of each file. But ctime change is used by dar to detect EA changes. In brief, the next time you backup a file that had to be read (thus which contents changed), its EA will be saved even if they had not changed. To avoid this slide effect, you can use the −ac option.

This ends the Extended Attribute selection explication let’s continue with other options.

−i, −−input <path>

is available when reading from pipe (basename is "−" for −x, −l, −t, −d or for −A when −c, −C or −+ is used). When reading from pipe, standard input is used, but with this option, the file <path> (usually a named pipe) is used instead. This option is to receive output from dar_slave program (see doc/NOTES for examples of use).

−o, −−output <path>

is available when reading from pipe (basename is "−" for −x, −l, −t, −d or for −A when −c, −C or −+ is used). When reading from pipe, standard output is used to send request to dar_slave, but with this option, the file <path> (usually a named pipe) is used instead. When standard output is used, all messages goes to standard error (not only interactive messages). See doc/NOTES for examples of use.

−O, −−comparison−field[=<flag>]

When comparing with the archive of reference (−c −A) during a differential backup, when extracting (−x) or when comparing (−d) do only consider certain fields. The available flags are:

ignore−owner

all fields are considered except ownership. This is useful when dar is used by a non−privileged user. It will not consider a file has changed just because of a uid or gid mismatch and at restoration dar will not even try to set the file ownership.

mtime

only inode type and last modification date is considered as well as inode specific attributes like file size for plain files. Ownership is ignored, permission is ignored. During comparison, difference on ownership or permission is ignored and at restoration time dar will not try to set the inode permission and ownership.

inode−type

Only the inode type is considered. Ownership, permission and dates are ignored. Inode specific attributes are still considered (like file size for plain files). Thus comparison will ignore differences for ownership, permission, and dates and at restoration dar will not try to set the ownership, permission and dates.

When no flag is provided to this option, −O option acts as if the "ignore−owner" flag was set, which is the behavior in older releases (< 2.3.0). Note also that for backward compatibility, −−ignore−owner option still exists and is now just an alias to the −−comparison−field=ignore−owner option. Of course if this option is not used, all fields are used for comparison or restoration.

−H[num], −−hour[=num]

if −H is used, two dates are considered equal if they differ from a integer number of hours, and that number is less than or equal to [num]. If not specified num defaults to 1. This is used when making a differential backup, to compare last_modification date of inodes, and at restoration time if the −r option (restore only more recent files) is used. This is to workaround some filesystems (like Samba filesystem) that seems to change the dates of files after having gone from or to daylight saving time (winter/summer time).

−E, −−execute <string>

the string is a user command−line to be launched between slices. For reading (thus using −t, −d, −l or −x options), the command is executed before the slice is read or even asked, for writing instead (thus using −c, −C or −+ option), the command is executed once the slice has been completed. Some substitution string can be used in the string:

%%

will be replaced by %

%p

will be replaced by the slice path

%b

will be replaced by the slice basename

%n

will be replaced by the slice number (to be read or just written). For reading, dar often needs the last slice, but initially it does not know its number. If it cannot be found in the current directory, the user command−line is then called with %n equal to 0. This is a convenient way to inform the user command to provide the last slice. If after it is still not present, dar asks the user (as usually) with a message on the terminal. Once the last slice is found, the user command−line is called a second time, with %n equal to the value of the last slice number.

%e

will be replaced by the slice extension (always substituted by "dar")

%c

will be replaced by the context. Actually three possible values exist: "init", "operation" and "last_slice". When reading an archive for (testing, extraction, diff, listing, or while reading the archive of reference, see below the −F option), the "init" context takes place from the beginning up to the time the catalogue is retrieved. On a multiple slice archive this correspond to the first slice request and to the last slice requests. After, that point comes the "operation" context. While creating an archive, the context is always "operation" except when the last slice has been created, in which case the context is set to "last_slice".

Several −E option can be given, given commands will then be cast also ends by "mp3"). But will not be saved "joe.mp2" (because it does not begin by "toto", nor ends by "mp3", and match "*.mp?" mask). As we see the last option (−I or −X) overcomes the previous one. −P, −g, −[ and −] act together the same but as seen above they do not only act on filename, but on the whole path+filename. Note that (−g, −P, −[, −]) and (−X , −I) are independent concerning their relative order. You can mix −X −I −g −P −] −[ in any order, what will be important is the relative positions of −X options compared to −I options, and the relative positions of −g −[ −] and −P options between them.

In logical terms, if <prev_mask> is the mask generated by all previous mask on the command line, −I <mask> generates the new following mask: <prev_mask> or <mask> . While −X <mask> generates the new following mask: <prev_mask> and not <mask>. This is recursive each time you add a −I or −X option. Things work the same with −P, −g, −[ and −] options.

This ends the file selection explication let’s continue with other options.

−u, −−exclude−ea <mask>

Do not consider the Extended Attributes (EA) that are matched by the given mask. By default, no EA are excluded, if the support for EA has been activated at compilation time. This option can be used multiple times.

−U, −−include−ea <mask>

Do only consider the EA that match the given mask. By default, all EA are included if no −u or −U option is present and if the support for EA has been activated at compilation time. This option can be used multiple times. See also the −am and −ae options, they also apply to −U and −u options and read below the Note concerning EA.

Note concerning Extended Attributes (EA)

Support for EA must be activated at compilation time (the configure script tries to do so if your system has all the required support for that). Thus you can get two binaries of dar (of the same version), one supporting EA and another which does not (dar −V to see whether EA support is activated). The archives they produce are the same and can be read by each other. The only difference is that the binary without EA support is not able to save or restore EAs, but is still able to test them and list their presence.

Since version 2.3.x the name of EA include the namespace for dar be able to consider any type of EA (not only "system" and "user" as previously). Thus the two previous options −u and −U have changed and now take an argument which is a mask applied to EA names written in the following form namespace.name where "namespace" is for example "user". Note that the mask may or may not include the dot (.) and match arbitrary part of the EA namespace+name, just remind that masks will be applied to the "namespace.name" global string.

the −am flag here also enables the ordered method, for EA selection too. The ordered versus normal method have been explained above in the file selection note, with some examples using −X and −I. Here this is the same with −U and −u, (just replace −X by −u and −I by −U and remember that the corresponding mask will apply to Extended Attribute selection in place of file selection).

Another point, independently of the −am option the −ae option can be used at restoration time only. If set, when a file is about to be overwritten, all EA will be first erased before restoring those selected for restoration in the archive (according to the −U and −u options given). If not set, the EA of the existing file will be overwritten, those extra EA that are not in the archive or are not selected for restoration in regard to the −u and −U options will be preserved. If you have not used any −u/−U option at backup time and want to restore from a set of full/differential backups the EA exactly as the were you have to use −ae for dar removes the EA that have been removed along the time, else you could get an EA that has been removed in a intermediate differential backup not been removed at restoration time.

Last point the −acase and −an options alters the case sensitivity of the −U and −u masks that follow them on the command−line/included files as they do for −I, −X, −P, −g, −[ and −] as well. Very last point ;−), by default during backup dar set back the atime after having read each file (see −aa/−ac options), this has as side effect to modify the ctime date of each file. But ctime change is used by dar to detect EA changes. In brief, the next time you backup a file that had to be read (thus which contents changed), its EA will be saved even if they had not changed. To avoid this slide effect, you can use the −ac option.

This ends the Extended Attribute selection explication let’s continue with other options.

−i, −−input <path>

is available when reading from pipe (basename is "−" for −x, −l, −t, −d or for −A when −c, −C or −+ is used). When reading from pipe, standard input is used, but with this option, the file <path> (usually a named pipe) is used instead. This option is to receive output from dar_slave program (see doc/NOTES for examples of use).

−o, −−output <path>

is available when reading from pipe (basename is "−" for −x, −l, −t, −d or for −A when −c, −C or −+ is used). When reading from pipe, standard output is used to send request to dar_slave, but with this option, the file <path> (usually a named pipe) is used instead. When standard output is used, all messages goes to standard error (not only interactive messages). See doc/NOTES for examples of use.

−O, −−comparison−field[=<flag>]

When comparing with the archive of reference (−c −A) during a differential backup, when extracting (−x) or when comparing (−d) do only consider certain fields. The available flags are:

ignore−owner

all fields are considered except ownership. This is useful when dar is used by a non−privileged user. It will not consider a file has changed just because of a uid or gid mismatch and at restoration dar will not even try to set the file ownership.

mtime

only inode type and last modification date is considered as well as inode specific attributes like file size for plain files. Ownership is ignored, permission is ignored. During comparison, difference on ownership or permission is ignored and at restoration time dar will not try to set the inode permission and ownership.

inode−type

Only the inode type is considered. Ownership, permission and dates are ignored. Inode specific attributes are still considered (like file size for plain files). Thus comparison will ignore differences for ownership, permission, and dates and at restoration dar will not try to set the ownership, permission and dates.

When no flag is provided to this option, −O option acts as if the "ignore−owner" flag was set, which is the behavior in older releases (< 2.3.0). Note also that for backward compatibility, −−ignore−owner option still exists and is now just an alias to the −−comparison−field=ignore−owner option. Of course if this option is not used, all fields are used for comparison or restoration.

−H[num], −−hour[=num]

if −H is used, two dates are considered equal if they differ from a integer number of hours, and that number is less than or equal to [num]. If not specified num defaults to 1. This is used when making a differential backup, to compare last_modification date of inodes, and at restoration time if the −r option (restore only more recent files) is used. This is to workaround some filesystems (like Samba filesystem) that seems to change the dates of files after having gone from or to daylight saving time (winter/summer time).

−E, −−execute <string>

the string is a user command−line to be launched between slices. For reading (thus using −t, −d, −l or −x options), the command is executed before the slice is read or even asked, for writing instead (thus using −c, −C or −+ option), the command is executed once the slice has been completed. Some substitution string can be used in the string:

%%

will be replaced by %

%p

will be replaced by the slice path

%b

will be replaced by the slice basename

%n

will be replaced by the slice number (to be read or just written). For reading, dar often needs the last slice, but initially it does not know its number. If it cannot be found in the current directory, the user command−line is then called with