Disk ARchive 2.3.2 reviewDownload
Dar is a shell command that backs up directory trees and files
Dar is a shell command that backs up directory trees and files. Disk ARchive has been tested under Linux, Windows, Solaris, FreeBSD, and NetBSD, and is released under the GNU General Public License (GPL).
Since version 2.0.0 an Application Interface (API) is available, opening the way for external/independent Graphical User Interfaces (GUIs) like kdar. This API relies on the libdar library, which is the core part of DAR programs; as such, the API is released under the GPL. Consequently, to use the API, your program must be released under the GPL as well.
Here are some key features of "Disk ARchive":
Dar is able to backup a complete file system to a single file. Additionally, a filter mechanism (based on filename) allows the exclusion or inclusion of matching files while saving or restoring a directory tree. A secondary filter mechanism permits the exclusion or inclusion of entire branches in a directory tree.
When making a backup with dar, you have can either 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). A differential backup, however, saves only files that have changed since a given reference backup. Additionally, files that existed in the reference backup but which no longer exist at the time of the differential backup are recorded in the new backup as deleted. 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 backups -- each new backup taking the last backup as its reference.
ZDar stands for Disk ARchive. From the beginning, it was designed to be able to split an archive over several pieces of removable media -- no matter how many or what size. Thus, dar is able to save over floppy disks, CD-Rs, DVD-Rs, CD-RWs, DVD-RWs, Zip disks, Jazz disks, etc. Dar is not concerned by un/mounting a removable medium; instead it operates independently of the hardware. Given the size, it will split the archive in several files (called slices), pausing before creating each new slice. This allows the user to un/mount a medium, burn the slice to a 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 only one slice. If a slice size is specified and dar creates multiple slices, the size of the first slice can be specified separately. This is useful if, for example, you want to fill up a partially filled disk before starting use of an empty one. At restoration time, dar will look for the slices it needs, asking for a slice only if it is missing and required.
Dar can use compression, though by default, no compression is used. Only the gzip and bzip2 algorithms are currently implemented, but some room has been made for other compression algorithms to be implemented in the future. Note that compression is done before slices are made, which means that using compression with slices will not make slices smaller, but will probably make fewer slices in the backup.
Even when using compression, dar does not have to read the whole backup to extract one file. If you just want to restore one file from a huge backup, the process will be much faster than using tar. To extract one or more files, dar first reads the catalogue (i.e. the contents of the backup), then goes directly to the location of the saved files you want to restore, and proceeds with restoration. When using slices, dar will ask only for the slices containing the files to restore. You can also restore all files from an archive, in which case dar will read the slices sequentially. When doing a full restore, no slice (except the first and last slices) will be asked for more than once.
Hard Link Considerations
Hard links are now properly saved, and are properly restored if possible. For example, restoring hard links across different filesystems will fail; dar will duplicate the inode and file content, and issue a warning.
If your system supports it, Dar is able to save and restore either all EAs, or just those of a given namespace (actually only "system" or "user" namespaces are supported). If no EAs have been backed up, and restoration occurs over a file that has EAs, they will be preserved. However, if the EAs of a file have been backed up as empty, any existing EAs for that file will be removed at restoration time, unless -u and/or -U is given on command-line.
Thanks to CRC (cyclic redundancy checks), dar is able to detect data corruption in the archive. Only the files where data corruption occurred will not be restorable, but dar will restore the remaining, non-corrupted files -- even when compression is used.
Using Pipes / Remote Operations
Dar is now able to produce an archive to its standard output, or to a named pipe. It can also read an archive through a pair of pipes, take a remote archive as reference, or even restore data from an archive on a remote host. This way, it is possible to store an archive remotely, and transmit it securely if using strong encryption methods (like ssh sessions). You may also find the netcat program to be very helpful for remote backups.
The catalogue (i.e.: the table of contents for an archive) can be extracted (isolated) to a small file, that can in turn be used as a reference for differential archives. There is no longer the need to provide an entire archive to be able to create a differential backup over it -- only its catalogue is necessary.
Re-shape Slices of an Existing Archive
The external program named "dar_xform" is able to change the size of the slices in a given archive. The resulting archive is totally identical to archives created directly by dar. A source archive can be taken from a set of slices, from standard input, or even a named pipe.
User command between slices
Dar provides several hooks 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.
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.
To overcome the weakness of the scrambling algorithm dar can use blowfish algorithm to encrypt the whole archive. An "elastic buffers" are inserted and encrypted with the rest of the data, at the beginning and at the end of the archive to prevent a clear text attack or codebook attack.
Dar can now read parameters from a file. This is a way to extend the command-line limited length of input. A configuration file can ask dar to read (and include) other configuration files. A simple but efficient mechanism forbids a file to include itself, directly or indirectly; otherwise, there is no limitation to the degree of recursion for the inclusion of configuration files.
Two special configuration files $HOME/.darrc and /etc/darrc are read if they exist. They share the same syntax: the syntax used on the command-line, 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).
Dar can now be given a special filter that determines which files will be compressed, and which files won't. This allows you to speed up the backup operation by not trying to compress *.mp3, *.mpg, *.zip, *.gz and other already compressed files. There is also another mechanism that allows you to say that files under a given size (whatever their name is), should not be compressed.
The advantage of differential backups is that it takes much less space to store and time to complete than always making full backup. However, you can end up having a lot of them. If you want to restore a particular file, you can thus spend time trying to find which backup the most recent version is located in. This problem is solved by using dar_manager. This little command-line program will gather content information from all of your backups. At restoration time, it calls dar for you, allowing you to restore the requested file(s) from the proper backup.
It is now possible to restore an arbitrary 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, regardless of what their real position is.
The Linux ext2/3 filesystem provides a set of flags for each inode, among which is the "nodump" flag. In short, this flag says "don't save this file," and is used by the so-called "dump" backup program. Dar can now take care to not save files that have this flag set.
Recover from Media Error
Dar relies on Parchive to repair corrupted archives, and it is integrated to dar through user scripts. When creating an archive, You just give the percentage of redundancy you want (high percentage makes you able to recover from more error, but makes the backup bigger), then after each slice creation, DAR invokes Parchive, which makes redundancy files for each slice. When you test an archive, DAR also invokes Parchive to test and repair the slices. Of course, you must save these parity files and reduce the slice size so that these additional files fit on the same disk. See the documentation for instructions on how to setup dar to use Parchive.
Dar is free of charge, and I do not see any reason to change that. The flip side is that you do not have the 24h/7d hot line available, nor a personal weekly note on new features. Of course, this means that you might also miss the last brand-new version... the one where the only new feature is the new number of its release. In fact, maybe it's better that way, no? :-)
the zlib library for gzip compression
the libbzip2 library for bzip2 compression
the openssl's libcrypto library for strong encryption
the upx command if you wish to compress executables
the doxygen command if you wan to build libdar's html documentation
What's New in This Release:
This release includes a documentation update and some minor bugfixes: the handling of regular expressions has been reviewed, a problem with installation of localized files has been fixed, and a bug met when only restoring more recent files has been fixed.
Disk ARchive 2.3.2 keywords