#

# DAR's FEATURES

Here follows the main features of dar tools. Each features let you have an overview and bring you some pointers you are welcome to follow for a more detailed information.

FILTERS | references: man dar / Notes chapter XVI
| keywords: -I -X -P -g -[ -] -am
dar is able to backup from total file system to a single file. Additionally a mechanism of filters permits, based on the filename, to exclude or include some files while backing up or restoring a directory tree. In the other side, a secondary filter mechanism permits to exclude some branches of a directory tree, or to only include some branches.

DIFFERENTIAL BACKUP | references: man dar/TUTORIAL
| keywords: -A

When making a backup with dar, you have the possibility to make a full backup or a differential backup. A full backup, as expected makes backup of all files as specified on the command line (with or without filters). Instead, a differential backup, (over filter mechanism), saves only files that have changed since a given reference backup. Additionally, files that existed in the reference backup and which do no more exist at the time of the differential backup are recorded in the backup. At recovery time, (unless you deactivate it), restoring a differential backup will update changed files and new files, but also remove files that have been recorded as deleted. Note that the reference backup can be a full backup or another differential backup. This way you can make a first full backup, then many differential backup, each taking as reference the last backup made.

SLICES | references: man dar/TUTORIAL/NOTES chapter III
| keywords: -s -S -p -aSI -abinary

Dar stands for Disk ARchive. From the beginning it was designed to be able to split an archive over several removable media whatever their number is and whatever their size is. Thus dar is able to save over old floppy disk, CD-R, DVD-R, CD-RW, DVD-RW, Zip, Jazz, etc... Dar is not concerned by un/mounting a removable medium, instead it is independent of hardware. Given the size, it will split the archive in several files (called SLICES), eventually pausing before creating the next one, allowing this way, the user to un/mount a medium, burn the file on CD-R, send it by email (if your mail system does not allow huge file in emails, dar can help you here also). By default, (no size specified), dar will make one slice whatever its size is. Additionally, the size of the first slice can be specified separately, if for example you want first to fulfill a partially filled disk before starting using empty ones. Last, at restoration time, dar will just pause and prompt the user asking a slice only if it is missing.

DIRECTORY TREE SNAPSHOT | references: man dar
| keywords: -A +

Dar can make a snapshot of a directory tree and files recording the inode status of files. This may be used to detect changes in files "diffing" the resulting archive with the filesystem at a later time. The resulting archive can also be used as reference to save file that have changed since the snapshot has been done. A snapshot archive is very small compared to the corresponding full backup, but it cannot be used to restore any data.

COMPRESSION | references: man dar
| keywords: -z -y
dar can use compression. By default no compression is used. Actually only gzip and bzip2 algorithm are implemented, but some room has been made for any other compression algorithm. Note that, compression is made before slices, which means that using compression with slices, will not make slices smaller, but will probably make less slices in the backup.

DIRECT ACCESS |

even using compression dar has not to read the whole backup to extract one file. This way if you just want to restore one file from a huge backup, the process will be much faster than using tar. Dar first reads the catalogue (i.e. the contents of the backup), then it goes directly to the location of the saved file(s) you want to restore and proceed to restoration. In particular using slices dar will ask only for the slice(s) containing the file(s) to restore.

HARD LINK CONSIDERATION |
hard links are now properly saved. They are properly restored if possible. If for example restoring across a mounted file system, hard linking will fail, but dar will then duplicate the inode and file content, issuing a warning.

EXTENDED ATTRIBUTES (EA) | references: man dar / Notes chapter I, V
MacOS X FILE FORKS / ACL | keywords: -u -U -am -ae

Dar is able to save and restore EA, all or just those matching a given pattern. If a restoration occurs over a file that has EA, they will be overwritten (user is first asked) unless you specify thanks to -u and -U options those to restore, EA may also be erased before restoration thanks to the -ae option.
File Forks are implemented over EA as well as Linux's ACL, they are thus transparently saved, tested, compared and restored by dar. Note that ACL under MacOS seem to not rely on EA, thus while they are marginally used they are ignored by dar.

ARCHIVE TESTING | references: man dar/TUTORIAL/ Good Backup Practice
| keywords: -t
thanks to CRC (cyclic redundancy checks), dar is able to detect data corruption in the archive. Only the file where data corruption occurred will not be possible to restore, but dar will restore the others even when compression or encryption (or both) is used.

REMOTE OPERATIONS | references: NOTES chapter II, XII/man dar dar_slave dar_xform
USING PIPES | keywords: -i -o -

dar is now able to produce an archive to its standard output or named pipe. it is also able to read an archive through a pair of pipes, to take a remote archive as reference, or even to restore data from an archive on a remote host. This way it is now possible to store an archive remotely and in total security (if using encrypted means, like ssh sessions. You will also find the netcat program very helpful)

ISOLATION | references: man dar
| keywords: -C
the catalogue (i.e.: the contents of an archive), can be extracted (this operation is called isolation) to a small file, that can in turn be used as reference for differential archive. There is no more need to provide an archive to be able to create a differential backup based on it, just its catalogue is necessary.

RE-SHAPE SLICES OF AN EXISTING | references: man dar_xform
ARCHIVE |
the provided program named "dar_xform" is able to change the size of slices of a given archive. The resulting archive is totally identical to archives directly created by dar. Source archive can be taken from a set of slice, from standard input or even a named pipe.

USER COMMAND BETWEEN SLICES | references: man dar dar_slave dar_xform/NOTES chapters VII, XI, XV
| keywords: -E -F
several hooks are provided for dar to call a given command once a slice has been written or before reading a slice. Several macros allow the user command or script to know the slice number, path and archive basename.

SCRAMBLING | references: man dar/NOTES chapter IX
| keywords: -K -J
the archive can be "scrambled" given a pass phrase. The same pass phrase must be given to retrieve or extract the archive contents. Of course this is not a very strong encryption, and its use is against simple user that do not have much mean to crack this scheme.

STRONG ENCRYPTION | references: man dar/NOTES chapter XVII
| keywords: -K -J -# -* blowfish
To overcome the weakness of the scrambling algorithm dar can use blowfish algorithm to encrypt the whole archive. Two "elastic buffers" are inserted and encrypted with the rest of the data, one at the beginning and one at the end of the archive to prevent a clear text attack or codebook attack.

CONFIGURATION FILE | references: man dar
| keywords: -B

dar can now read parameter from file. This is a way to extends the command-line length limited length input. A configuration file can ask dar to read (to include) other configuration files. A simple but efficient mechanism forbids a file to include itself directly or not, and there is no limitation in the degree of recursion for the inclusion of configuration files.
Two special configuration files $HOME/.darrc and /etc/darrc are read if they exist. The share the same syntax as any configuration file which is the syntax used on the command-line, eventually completed by newlines and comments.
Any configuration file can also receive conditional statements, which describe which options are to be used in different conditions. Conditions are: restoration, listing, testing, difference, saving, isolation, any operation, none yet defined (which may be useful in case or recursive inclusion of files)

SELECTIVE COMPRESSION | references: man dar/samples
| keywords: -Y -Z -m -am
dar can now be given a special filter that determines which files will be compressed or not. This way you can speed up the backup operation by not trying to compress *.mp3, *.mpg, *.zip, *.gz and other already compressed files. Moreover another mechanism allow you to say that file under a given size (whatever their name is), will not be compressed.

DAR MANAGER | references: man dar_manager/NOTES chapter X

The advantage of differential backup is that it takes much less space to store and time to complete than always making full backup. But, in the other hand, you can have a lot of them. If you want to restore a particular file, you can thus spend time to find in which backup is located the most recent version. This is solved using dar_manager. This little command-line program, will gather contents information of all your backups. At restoration time, it will call dar for you to restore the asked file(s) from the proper backup.

FLAT RESTORATION | references: man dar
| keywords: -f
It is now possible to restore any file without restoring the directories and subdirectories it was in at the time of the backup. If this option is activated, all files will be restored in the (-R) root directory whatever their real position is.

NODUMP FLAG | references: man dar
| keywords: --nodump
Linux ext2/3 filesystem, provides for each inodes a set of flag, among which is the "nodump" flag, which in substance says "don't save this file". This is used by the so-called dump backup program. Dar can now take care to not save those files that have this flag set.

DATA PROTECTION | references: man dar/NOTES chapter XIV, XV
| keywords:
dar relies on the Parchive program for data protection against media errors. Several scripts are provided for easy integration in dar thanks to the -E and -F options, and one configuration auxiliary file with conditionnal statement may hide them and decide the one to call depending on the context (listing, testing, extracting, archiving...)

ONE FILESYSTEM | references: man dar
| keywords: -M
dar can backup files of a give filesystem only, even if some subdirectory in the scope are mounting points for other filesystems, dar will not recurse in theses directories.

ARCHIVE MERGING | references: man dar
| keywords: -+ -ak

It is now possible to merge two existing archives in a single one. For now if a given file is located in both archives the version of the first archive will be kept. In the future it is probable that something more interesting process like keeping the most recent file or maybe user defined selection will be available. Note that this feature let you change the encryption scheme of an archive as well as change the compression algorithm. Note last, that if the two archives use the same compression, dar can merge them without uncompressing data files.

ARCHIVE SUBSETTING | references: man dar
| keywords: -+

It is possible to "extract" a subset of files from an archive and put them in a new archive without having to really extract them to files. It is also possible to avoid uncompressing files that are kept in the resulting archive or change their compression, as well change the encryption scheme used. Last, you may manipulate this way files and their EA while you don't have EA support available on your system.