Dar Documentation


DAR's - Frequently Asked Questions




Questions:

I restore/save all files but dar reported some files have been ignored, what are those ignored files?
Dar hangs when using it with pipes, why?
Why, when I restore 1 file, dar report 3 files have been restored?
While compiling dar I get the following message : " g++: /lib/libattr.a: No such file or directory", what can I do?
I cannot find the binary package for my distro, where to look for?
Why, does dar reports "ignored" files while I make a backup without filter?
Can I use different filters between a full backup and a differential backup? Would not dar consider some file not included in the filter to be deleted?
Once in action dar makes all the system slower and slower, then it stops with the message "killed"! How to overcome this problem?
I have a backup I want to change the size of slices?
I have a backup in one slice, how can I split it in several slices?
I have a backup in several slice, how can I stick all them in a single file?
I have a backup, how can I change its encryption scheme?
I have a backup, how can I change its compression algorithm?
Which options can I use with which options?
Why dar reports corruption for the archive I have transfered with FTP ?

Answers:

I restore/save all files but dar reported some files have been ignored, what are those ignored files?
When restoring/saving, all files are considered by default. But if you specify some files to restore or save, all other files are "ignored", this is the case when using -P -X -I or -g.

Dar hangs when using it with pipes, why?
Dar can produce archive on its standard output, if you give '-' as basename. But it cannot read an archive from its standard input. To feed an archive to dar through pipes, you need dar_slave and two pipes. The first pipe transmits orders from dar to dar_slave that tell dar_slave the requested portion of the archive, the second pipe goes the other way and carries from dar_slave the data requested by dar. This way, only needed data get transmitted over pipes, which cannot be possible with a single pipe.

Why, when I restore 1 file, dar report 3 files have been restored?
if you restore for example the file usr/bin/emacs dar will first restore usr (if the directory already exists, it will get its date and ownership restored, all existing files will be preserved), the /usr/bin is restored, then usr/bin/emacs is restored. Thus 3 inodes have been restored or modified while only one file has been asked for restoration.

While compiling dar I get the following message : " g++: /lib/libattr.a: No such file or directory", what can I do?
The problem comes from an incoherence in your distro (Redhat and Slackware seem(ed) concerned at least): Dar (Libtool) finds /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../libattr.la  file to link with. This file defines where is located libattr static and dynamic libraries but in this file both static and dynamic libraries are expected to be found under /lib. While the dynamic libattr is there,  the static version has been moved to /usr/lib. A workaround is to make a symbolic link:

ln -s /usr/lib/libattr.a /lib/libattr.a


I cannot find the binary package for my distro, where to look for?
For any binary package, ask your distro maintainer to include dar (if not already done), and check on the web site of your preferred distro for a dar package

Why, does dar reports "ignored" files while I make a backup without filter?
If you give to dar an argument which is not an option, up to version 2.2.x it is interpreted as "to save that file only". Let's take an example:

dar -c my-files -y -s 2045M data

reports

--------------------------------------------
31754 inode(s) saved
with 0 hard link(s) recorded
0 inode(s) not saved (no file change)
0 inode(s) failed to save (filesystem error)
-> 147 files(s) ignored (excluded by filters)
0 files(s) recorded as deleted from reference backup
--------------------------------------------


the 147 files are due to the fact dar has excluded 147 files and directories which are not "data" in the current directory. Note also that the use arguments out of options like "data" is deprecated since version 2.2.0, you would rather use -g option:

dar -c my-files -y -s 2045M -g data

In version 2.3.x such arguments which are not options will have another meaning. Note that starting version 2.3.x the option -vs will report those entry that are skipped.


Can I use different filters between a full backup and a differential backup? Would not dar consider some file not included in the filter to be deleted?
Yes, you can. No, there is no risk to have dar deleting the files that were not selected for the differential backup. Here is the way dar works:

During a backup process, when a file is ignored due to filter exclusion, an "ignored" entry is added to the catalogue however. At the end of the backup, dar compares both catalogues the one of reference and the new one built during the backup process, and adds a "detruit" (destroyed in English) entry, when an entry of the reference is not present in the new catalogue. Thus, if an "ignored" is present no "detruit" will be added for that name. Then all "ignored" entries are removed and the catalogue is dumped in the archive.


Once in action dar makes all the system slower and slower, then it stops with the message "killed"! How to overcome this problem?
Dar needs virtual memory to work. Virtual memory is the RAM + SWAP space. Dar memory requirement grows with the amount of file saved, not with the amount of data saved. If you have a few huge files you will have little chance to see any memory limitation problem. At the opposite, saving a plethora of files (either big or small), will make dar request a lot of virtual memory. Dar needs this memory to build the catalogue (the contents) of the archive it creates. Same thing, for differential backup, except it also needs to load in memory the catalogue of the archive of reference, which most of the time will make dar using twice more memory when doing a differential backup than a full backup.

Anyway, the solution is:
  1. Read the doc/LIMITATIONS file to understand the problem and be aware of the limitations you will bring at step 3, bellow.
  2. If you can, add swap space to your system (under Linux, you can either add a swap partition or a swap file, which is less constraining but also a bit less impressive). Bob Barry provided a script that can give you a raw estimation of the required virtual memory (doc/samples/dar_rqck.bash).
  3. If this is not enough, or if you don't want/can add swap space, recompile dar giving --enable-mode=64 argument to the configure script.
  4. If this not enough, and you have some money, you can add some RAM on you system
  5. If all that fails, ask for support on the dar-support mailing-list.
There is still a workaround which is to make several smaller archives of the files to backup. For example, make a backup for all in /usr/local another for all in /var and so on. Theses backup can be full or differential. The drawback is not big as you can store theses archive side by side and use them at will. Moreover, you can feed a unique dar_manager database with all theses different archives. This which will hide you the fact that there are several full archives and several differential archives concerning different set of files.


I have a backup I want to change the size of slices?
dar_xform is your friend!

dar_xform -s <size> original_archive new_archive

dar_xform will create a new archive with the slices of the requested size, (you can also make use of -S option for the first slice). Note that you don't need to decrypt the archive, not dar will uncompress it, this is thus a very fast processing. See dar_xform man page for more.


I have a backup in one slice, how can I split it in several slices?
dar_xform is your friend!

dar_xform -s <size> original_archive new_archive

see above for more.

I have a backup in several slice, how can I stick all them in a single file?
dar_xform is your friend!

dar_xform original_archive new_archive

dar_xform without -s option creates a single sliced archive. See dar_xform man page for more.


I have a backup, how can I change its encryption scheme?
The merging feature let you do that. The merging has two roles, putting in one archive the contents of two archives, and at the same time filtering file contents to not copy certain files in the resulting archive. The merging feature can take two but also only one archive as input, so we will use it in a special way:
  • a single input (our original archive)
  • no file filtering (so we keep all the files)
  • Keep files compressed (no decompression/re compression) to speed up the process
dar -+ new_archive -A original_archive -K "<new_algo>:new pass" -ak

If the original archive was in clear you need to add the -J option to provide the encryption key, and if you don't want to have password in clear on the command line (command that can be seen with top or ps by other users), simply provide "<algo>:" then dar will ask you on the fly the password, if using blowfish you can then just provide ":" for the keys:

dar -+ new_archive -A original_archive -K ":" -J ":" -ak

Note that you can also change slicing of the archive at the same time thanks to -s option:

dar -+ new_archive -A original_archive -K ":" -J ":" -ak -s 1G

I have a backup, how can I change its compression algorithm?
Same thing as above : we will use the merging feature :

to use bzip2 compression:

dar -+ new_archive -A original_archive -y

to use gzip compression

dar -+ new_archive -A original_archive -z

to use no compression at all:

dar -+ new_archive -A original_archive

Note that you can also change encryption scheme and slicing at the same time you change compression:

dar -+ new_archive -A original_archive -y -K ":" -J ":" -s 1G

Which options can I use with which options?
DAR provides seven commands:

-c   to create a new archive
-x   to extract files from a given archive
-l    to list the contents of a given archive
-d   to compare the contents of an archive with filesystem
-t    to test the coherence of a given archive
-C  to isolate an archive (extract its contents to a usually small file)
-+   to merge two archives in one or create a sub archive from one or two other archives

Follow for each command the available options (those marked OK):



-c
-x
-l
-d
-t
-C
-+
-v
OK
OK
OK
OK
OK
OK
OK
-vs
OK
OK
--
OK
OK
-- OK
-b
OK
OK
OK
OK
OK
OK
OK
-n
OK
OK
-- -- -- OK
OK
-w
OK OK -- -- -- OK OK
-wa
-- OK -- -- -- -- --
-R
OK OK -- OK -- -- --
-X
OK OK OK OK OK -- OK
-I
OK OK OK OK OK -- OK
-P
OK OK -- OK OK -- OK
-g
OK OK -- OK OK -- OK
-]
OK OK -- OK OK -- OK
-[
OK OK -- OK OK -- OK
-u
OK OK -- -- -- -- OK
-U
OK OK -- -- -- -- OK
-i
OK OK OK OK OK OK OK
-o
OK OK OK OK OK OK OK
-O
OK OK -- OK -- -- --
-H
OK OK -- -- -- -- --
-E
OK OK OK OK OK OK OK
-F
OK -- -- -- -- OK OK
-K
OK OK OK OK OK OK OK
-J
OK -- -- -- -- OK OK
-#
OK OK OK OK OK OK OK
-*
OK -- -- -- -- OK OK
-B
OK OK OK OK OK OK OK
-N
OK OK OK OK OK OK OK
-e
OK -- -- -- -- OK OK
-aSI
OK OK OK OK OK OK OK
-abinary
OK OK OK OK OK OK OK
-Q
OK OK OK OK OK OK OK
-aa
OK -- -- OK -- -- --
-ac
OK -- -- OK -- -- --
-am
OK OK OK OK OK OK OK
-an
OK OK OK OK OK OK OK
-acase
OK OK OK OK OK OK OK
-j
OK OK OK OK OK OK OK
-z
OK -- -- -- -- OK OK
-y
OK -- -- -- -- OK OK
-s
OK -- -- -- -- OK OK
-S
OK -- -- -- -- OK OK
-p
OK -- -- -- -- OK OK
-@
-- -- -- -- -- -- OK
-$
-- -- -- -- -- -- OK
-~
-- -- -- -- -- -- OK
-%
-- -- -- -- -- -- OK
-D
OK -- -- -- -- -- OK
-Z
OK -- -- -- -- -- OK
-Y
OK -- -- -- -- -- OK
-m
OK -- -- -- -- -- OK
--nodump
OK -- -- -- -- -- --
-G
OK -- -- -- -- OK OK
-M
OK -- -- -- -- -- --
-,
OK -- -- -- -- -- --
-k
-- OK -- -- -- -- --
-r
-- OK -- -- -- -- --
-f
-- OK -- -- -- -- --
-ae
-- OK -- -- -- -- --
-T
-- -- OK -- -- -- --
-as
-- -- OK -- -- -- --



Why dar reports corruption of the archive I have transfered with FTP ?

Dar archive are binary files, they must be transfered in binary mode when using FTP. This is done in the following way for the ftp command-line client :

ftp <somewhere>
<login>
<password>
bin
put <file>
get <file>
bye

If you transfer an archive (or any other binary file) in ascii mode (the opposite of binary mode), the 8th bit of each byte will be lost and the archive will become impossible to recover (due to the destruction of this information). Be very careful to test your archive after transferring back to you host to be sure you can delete the original file.