Dar (disk archiver)

From Wikipedia, the free encyclopedia
  (Redirected from DAR (Disk Archiver))
Jump to: navigation, search
Initial release 2 February 2002; 12 years ago (2002-02-02)[1]
Stable release 2.4.13 / April 21, 2014 (2014-04-21)
Operating system Cross-platform
Type Data compression
License GPL
Website dar.linux.free.fr

DAR (Disk ARchive) is a command-line archiving tool. DAR is intended as a replacement for tar.


  • Support for slices, archives split over multiple files of a particular size.
  • Option of deleting files from the system which are removed in the archive.
  • Incremental backup,
  • Decremental backup,
  • Takes care of hard-linked inodes (hard-linked plain files, char devices, block devices, hard-linked symlinks (!))
  • Takes care of sparse files,
  • Takes care of POSIX Extended Attributes, which implies POSIX File ACL under Linux and File forks under Mac OS X,
  • Per-file compression with gzip, bzip2 or lzo (as opposed to compressing the whole archive). An individual can choose not to compress already compressed files based on their filename suffix.
  • Fast-extracting of files from anywhere in the archive.
  • Fast listing of archive contents through saving the catalogue of files in the archive.
  • Optional Blowfish, Twofish, AES, Serpent, Camellia encryption.
  • Live filesystem backup: detects when a file has been modified while it was read for backup and can retry saving it up to a given maximum number of retries
  • Live Database backup: a user command can be launched before and after saving a particular set of files or directories, suitable to put a database in a consistent state during its backup,
  • hash file (md5 or sha1) generated on-fly for each slice, the resulting file is compatible with md5sum or sha1sum, to be able to quickly check each slice's integrity,
  • Dar is filesystem independent: it may be used to restore a system to a partition of a different size and/or to a partition with a different filesystem.[2]
  • Runs under Linux, Windows, FreeBSD, NetBSD, OpenSolaris, Mac OS X and probably some other systems (dar should run at least under any Unix system).


There are GUI frontends for DAR called:

A text-mode browser/extractor: plugin for dar files in mc (Midnight Commander).

A scheduler / command-line frontend known as SaraB allows the Towers of Hanoi, Grandfather-Father-Son, or any custom backup rotation strategy, and modifications are available for PAR file support. Extended versions known as bzSaraB and baras are also available.

Definition from: dar -h[edit]

usage: dar [ -c | -x | -d | -t | -l | -C | -+ ] [<path>/]<basename> [options...]
       dar -h
       dar -V

Commands are:
   -c  creates an archive
   -x  extracts files from the archive
   -d  compares the archive with the existing filesystem
   -t  tests the archive integrity
   -l  lists the contents of the archive
   -C  isolates the catalogue from an archive
   -+  merge two archives / create a sub archive

   -h  displays this help information
   -V  displays version information

Common options:
   -v              verbose output
   -vs             display skipped files
   -R <path>         filesystem root directory (current dir by default)
   -X <mask>         files to exclude from the operation (none by default)
   -I <mask>         files to include in the operation (all by default)
   -P <path>         subdirectory to exclude from the operation
   -g <path>         subdirectory to include in the operation
   -[ <filename>   filename contains a list of files to include
   -] <path>         filename contains a list of files to exclude
   -n              don't overwrite files
   -w              don't warn before overwriting files
   -wa             don't warn before overwriting and removing files
   -b              ring the terminal bell when user action is required
   -O[ignore-owner | mtime | inode-type] do not consider user and group
   -H [N]          ignore shift in dates of an exact number of hours
   -E <string>       command to execute between slices
   -F <string>       same as -E but for the archive of reference
   -u <mask>         mask to ignore certain EA
   -U <mask>         mask to allow certain EA
   -K <string>       use <string> as key to encrypt/decrypt
   -J <string>       same as -K but it does concern the archive of reference
   -# <integer>    encryption block size
   -* <integer>    same as -# but for archive of reference
   -B <filename>   read options from given file
   -N              do not read ~/.darrc nor /etc/darrc configuration file
   -e              dry run, fake execution, nothing is produced
   -Q              suppress the initial warning when not launched from a tty
   -aa             do not try to preserve atime of file open for reading.
   -ac             do not try to preserve ctime (default behavior).
   -am             set ordered mode for all filters
   -an             the masks that follow are now case insensitive
   -acase          the masks that follow are now case sensitive
   -ar             set the following masks to be regex expressions
   -ag             set the following masks to be glob expressions
   -j              ask user what to do when memory is exhausted

Saving / Isolation / merging options (to use with -c, -C or -+):
   -A [path/]<basename> archive to take as reference
   -@ [path/]<basename> auxiliary archive of reference for merging
   -$ <string>       encryption key for auxiliary archive
   -~ <string>       command between slices of the auxiliary archive
   -z [level]      compress data in archive using gzip algorithm
   -y [level]      compress data in archive using bzip2 algorithm.
   -s <integer>    split the archive in several files of size <integer>
   -S <integer>    first file size (if different from following ones)
   -aSI            slice size suffixes k, M, T, G, etc. are power of 10
   -abinary        slice size suffixes k, M, T, G, etc. are power of 2
   -p              pauses before writing to a new file
   -D              excluded directories are stored as empty directories
   -Z <mask>         do not compress the matching filenames
   -Y <mask>         do only compress the matching filenames
   -m <number>       do not compress file smaller than <number>
   --nodump        do not backup, files having the nodump 'd' flag set
   -G [path/]<basename> Do on-fly catalogue isolation of the resulting archive
   -M              stay in the same filesystem while scanning directories
   -,              ignore directories that follow the Directory Tagging

Restoring options (to use with -x) :
   -k              do not remove files destroyed since the reference backup
   -r              do not restore file older than those on filesystem
   -f              do not restore directory structure

Reading options (to use with -x, -d, -t, -l, -A)
   -i <named pipe> pipe to use instead of std input to read data from dar_slave
   -o <named pipe> pipe to use instead of std output to orders dar_slave

Listing options (to use with -l):
   -T              tree output format
   -as             only list files saved in the archive

Type "man dar" for more details and for all available options.

See also[edit]

External links[edit]