# The &kdar; Handbook

Johnathan
K.
Burchill

    jkerrb@shaw.ca

10 July 2005
2.0.6

The &kde; Disk archiver (&kdar;) is a backup and archiving utility. Use &kdar; to make full and incremental backups of your data.

KDE
kdar
backup
archive
slice
disk

## Introduction

### Overview

&kdar; is the KDE Disk archiver, a disk-based archiving and backup utility.

&kdar; is built around the disk archive library by Denis Corbin, and is similar in function to his DAR program. DAR is somewhat analogous to the tape archiver shell command tar, but is better suited for backups onto disk-based media, such as CD-R's, DVDs, Jazz, Zip, other hard-drives, etc.

&kdar; can perform differential backups, which means that it can quickly store the differences between a recent full backup and the current state of your data.

&kdar; now supports strong encryption based on the blowfish algorithm.

A sophisticated file filtering mechanism allows you to select which files and directories to backup or restore, and which files to compress.

Furthermore, a small catalog can be copied from the archive, which means you don't need your archive CD's to do a differential backup of the entire filesystem. You just need to store the much smaller catalog file on your filesystem.

&kdar; remembers your settings between sessions. You can customize your backup settings into different profiles, too. For example, you might have one profile for doing system-wide backups, and another profile for backing up only your digital camera images and email.

Best of all, restoring files is easy! You can restore individual files or directories, even entire archives, from &kdar;'s convenient tree-view interface. &kdar;'s archives are fully compatible with dar (they are just DAR archives, after all), so if you don't have access to X-windows, you can still perform tests and restorations using Denis Corbin's dar command from a text console. You can even export dar scripts from within &kdar; ahead of time and store them with your archives. This makes full restoration very straight-forward with the help of a boot disk, like Trinux, or one from your favourite GNU/Linux distribution. I've done complete restores on my laptop twice, and that was after completely overwriting the hard drive with "That Other OS".

The next section describes &kdar;'s features in more detail.

### Features

&kdar; uses the Disk ARchive library, libdar. This means that &kdar; can have all of the features of DAR. However, a few features are not yet implemented. Here is a list of features that are implemented in &kdar; version 2.0.0:

- Strong encryption

- Filters

- Differential backup

- Slices

- Compression

- Selective compression

- Direct access

- Hard links saved

- Extended attributes

- Archive testing

- Isolation

- Configuration stored

- Restore individual files

- Flat restoration

- Nodump flag

- User commands between slices

- String substitution

- Equivalent DAR commands

These descriptions are mostly copied from Denis Corbin's FEATURES document from the libdar source.

Strong encryption

  &kdar; can encrypt your archives based on the strong "blowfish" algorithm. You can take advantage of the KWallet to store your archive password. (back to top)

Filters

  &kdar; is able to backup everything from a single file to an entire filesystem. Additionally a mechanism of filters permits, based on the filename, to exclude or include some files while backing up or restoring a directory tree. Similarly, a secondary filter mechanism permits to exclude some branches of a directory tree, or to only include some branches. (back to top)

Differential backup

  When making a backup with &kdar;, 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. (back to top)

Slices

  &kdar; can split an archive over several removable media whatever their number is and whatever their size is. Thus &kdar; is able to save over old floppy disk, CD-R, DVD-R, CD-RW, DVD-RW, Zip, Jazz, etc... &kdar; 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. &kdar; can also backup data to 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, &kdar; will just pause and prompt the user asking a slice only if it is missing. (back to top)

Compression

  &kdar; can use compression. Actually only the gzip and bzip2 algorithms are implemented, but some room has been made for any other compression algorithm. Note that, compression is made before slices are created, which means that using compression with slices will not make slices smaller, but will probably make less slices in the backup. (back to top)

Selective compression

  &kdar; can 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 allows you to say that files under a given size (whatever their name is), will not be compressed. (back to top)

Direct access

  Even using compression &kdar; does not have to read the entire 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. &kdar; first reads the catalog (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 &kdar; will ask only for the slice(s) containing the file(s) to restore. (back to top)

Hard links

  Hard links are 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. (back to top)

Extended attributes

  Support for extended attributes have to be activated at libdar compilation time. &kdar; is able to save and restore EA, all or just those of a given namespace (system or user). If no EA have been saved and restoration occurs over a file that has EA, they will be preserved. But if they have been saved empty for a given file, any existing EA for that file will be removed at restoration time, unless &kdar; is configured to ignore user Extended Attributes and ignore system Extended Attributes. (back to top)

Archive testing

  thanks to CRC (cyclic redundancy checks), &kdar; is able to detect data corruption in the archive. Only the file where data corruption occurred will not be possible to restore, but &kdar; will restore the others even when compression is used. (back to top)

Isolation

  The catalog (i.e.: the contents of an archive), can be extracted (this operation is called isolation) to a small file. This catalog can in turn be used as reference for making a differential archive. There is no more need to provide an archive to be able to create a differential backup over it. Just its catalog is necessary. (back to top)

Configuration stored

  &kdar; settings are automatically stored between sessions. (back to top)

Restore individual files

  You can restore any combination of individual files and directories. (back to top)

Flat restoration

  It is possible to restore any file without restoring the directories and subdirectories it was in at the time of the backup. If this option is enabled, all files will be restored in the root directory whatever their real position is. (back to top)

Nodump flag

  The &Linux; ext2/3 filesystem provides for each inodes a set of flags, 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. &kdar; can take care not to save files that have this flag set. (back to top)

User commands between slices

  &kdar; can 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. Use this feature to automate the CD writing process between slices, for example. (back to top)

String substitution

  &kdar; can substitute convenient codes provided by the user for new archive names, as well as for the user commands. (back to top)

Equivalent DAR commands

  &kdar; can export the equivalent dar commands for its archiving operations. The commands are also written to a log file. (back to top)

### The parts of &kdar;

Here is a brief overview of the parts of the &kdar; main window.

Main &kdar; window
Here's a screenshot of &kdar;.

The main &kdar; user interface window.

Below the titlebar are &kdar;'s Menubar and Toolbar. The Menubar allows you to open and create archives, operate on them, and get information about &kdar;. The Toolbar gives you one-click access to many of &kdar;'s features, and you can configure it to your liking by right-clicking on it.

Next, the Archive browser allows you to view the contents of the current archive by descending through the file tree. By high-lighting and right-clicking one or more files or directories, you can restore individual or groups of files onto your filesystem.

At the bottom of the &kdar; window a Message window provides you with feedback about the outcome of archive operations (e.g. testing, creating, restoring, etc.). Error messages are displayed here. The contents of this window can be printed, and you can clear it at any time.

The relative sizes of the Archive browser and the Message window can be changed by dragging the horizontal bar that separates the two windows. You can even make one window take up the entire view by dragging the bar all the way in the appropriate direction.

Below the Messages panel is the &kdar; status bar. This provides you with basic feedback about the status of the various archive operations. For example, when restoring an archive, the filenames are displayed here as they are written to your hard drive.

## Using &kdar;

### Basic usage

When you first start &kdar;, you will be asked to provide the name of a directory where archives will be stored by default. If you are not happy with the default location, just click on the directory icon to browse your filesystem and select a suitable storage directory. If necessary, use the toolbar at the top of the dialog to create a new directory. I recommend "/var/backups/dar-backups", or something like that. This indicates that the archives are accessible by the command-line "dar", as well as by &kdar;.

A short splash screen is shown while &kdar; starts up. You can disable it from the Settings dialog.

The menu is set up as File | Archive | Messages | Settings | Help.

To Quit, type Ctrl-Q or File->Quit. &kdar; will wait for any running operation to finish before closing the window. If you want to cancel the operation, select the Archive->Stop Operation menu item, or just click on the red and white X symbol in the toolbar. You will be prompted whether you really want to cancel the operation, or continue.

&kdar; uses and creates "disk archives", which are files that end with ".dar". One of the key features of &kdar; is that its archives can be created in parts, called "slices". The size of each slice can be set from a list of common media types such as "DVD", "CD-R", "Zip", or it can be customized to be any size. Each archive slice is denoted by a period and a number before the ".dar" extension, such as ".1.dar", ".2.dar", etc. Each archive has a different name, called the "basename", that briefly describes what the archive contains. So a full archive slice name consists of a "basename" followed by the slice number and the extension ".dar".

For example, a full backup of your filesystem might have archive slices that look like "localhost-20040808-full.1.dar", "localhost-20040808-full.2.dar", and so-on, up to the number of slices in the archive.

You can also ask &kdar; not to split the archive into individual slices. The resulting archive still follows the naming convention described above: its slice number is "1".

Many actions in &kdar; need an archive loaded to work. To load, or "open", a disk archive, select File->Open archive.

If you selected an archive with .*.dar on the end of the filename (i.e. test-archive.1.dar), &kdar; will automatically remove it for you. You can also type in the archive name without the slice number and extension. Recently-opened archives can be accessed quickly from File->Open Recent.

&kdar; can load an archive from the command-line. Just type the archive path and name as an argument.

&kdar;'s archives are simply DAR archives, so they are fully compatible with Denis Corbin's "dar" program. Dar is very useful in situations where you don't have access to X-Windows, say after a disk crash where you need to boot from a rescue disk.

If you do not yet have any archives, you can easily create one now, as described in the next section.

### Creating archives

To create an archive, select "Archive->Create" (at bottom of menu). The Create archive wizard will appear.

Wizard for creating archives The Archive->Create wizard.

The Archive->Create wizard.

Let the wizard take you step-by-step through the archiving process. Use the Next > and < Back buttons at the bottom of the wizard to navigate the pages. The rest of this section describes this procedure in detail, and you can skip it if you just want to create a basic archive.

#### Profiles

The first page of the create wizard gives you an opportunity to restore a profile. Profiles store all of the information needed to perform one of &kdar;'s operations. You save them to your filesystem as regular files, with any name you like, ending with .kdar. Currently &kdar; supports creation and restoration profiles.

To load a creation profile, click the Restore profile button and select the profile. You probably haven't saved a profile yet, so just click the Next > button.

#### Archive Name

Choose an appropriate name for your archive.

Choose archive name
Choose a name for your archive.

Choose a name for your archive.

You cannot continue to the next page until you have done this. I usually put a descriptive name, and the date (e.g. "040208"). You only need a basename here, not the entire archive name (e.g. "test-archive-040208", not "test-archive-040208.1.dar"), so if you are overwriting an existing archive, remove any of the ".*.dar" trailing stuff.

The archive will be stored in the default storage directory. If you want to store the archive in a different location, just prefix the name with the full path to the new location, including the leading "/". You can also choose a new location and name by clicking the directory icon to browse your filesystem.

##### Archive Name Macros

&kdar; understands the following macros which you can type into the archive name. &kdar; automatically substitutes these macros into the name before creating the archive.

- %hostname: Replaced by the computer's hostname, i.e. "igloo", or "localhost" if the hostname can't be found.

- %date: Replaced by today's date, as "YYYYMMDD".

- %time: Replaced by the current time, as "hh:mm:ss".

- %year: Replaced by the current year, as "YYYY".

- %month: Replaced by the current month, as "MM".

- %day: Replaced by the current day of the month, as "DD".

- %hour: Replaced by the current hour, as "hh".

- %minute: Replaced by the current minute, as "mm".

- %second: Replaced by the current second, as "ss".

- %full: Replaced by "full". Used to indicate that this is a full backup.

- %diff: Replaced by "diff". Used to indicate that this is a differential, or incremental, backup.

- %refname: If making a differential backup, this is replaced by the basename of the reference archive, excluding path and extension. If not making a differential backup, this is replaced by "NO-REF-ARCHIVE".

For example, if you are making a full backup you might use "%hostname-%full-%date" for the new archive name. On a computer called "igloo", this would create archive slices named "igloo-full-20040729.1.dar", "igloo-full-20040729.2.dar", etc.

A few days later, if you are making a differential backup with "/data/backups/igloo-full-20040729" as the reference archive, you might use "%refname-%diff-%date" as the new archive name. This would create archive slices called "igloo-full-20040729-diff-20040805.1.dar", "igloo-full-20040729-diff-20040805.2.dar", etc.

Continue to the next wizard page to choose the top-level directory that you want to archive.

#### Root directory

The root directory is the filesystem's top-level directory that you want to archive. &kdar; will consider all directories and files below this directory for inclusion in the archive, but no files above or adjacent to this directory.

Choose root directory
Choose the archive's root directory.

Choose the archive's root directory.

You can browse your filesystem to choose the top-level directory by clicking the directory icon to the right of the text box.

#### Differential archives

Creating full system backups can take several hours on modern filesystems. &kdar; can optionally store the difference between the current state of the filesystem and the state of the filesystem when you last created a full backup. The new archive is called a "differential" archive. Performing a differential backup can take considerably less time than doing a full backup, and the resulting archive usually takes up much less space on your filesystem or storage media.

Choose reference archive
Choose the differential archive's reference archive.

Choose the differential archive's reference archive.

If you want to make a differential backup, enable the differential backup checkbox, and select the reference archive. The reference archive can be from a previous full backup, a previous differential backup, or an archive catalog. Archive catalogs contain only the basic archive information, such as the contents, but are equivalent to regular archives as far as differential creation is concerned. You create a catalog by "isolating" it from its archive. Isolation is described later in this manual.

Leave the checkbox unchecked if you're making a new archive (e.g., a full backup).

#### Advanced creation settings

&kdar; has many advanced creation features which you can configure by clicking the Configure creation options button. This brings up a configuration dialog which allows you to customize the creation process to suit your needs. For example, &kdar; has powerful directory and file filtering mechanisms which allow you to fine-tune which directories and files to include in the archive. You can also choose whether to compress the archive contents, and you can specify which types of file to exclude from the compression process. &kdar; now supports strong encryption, and you can enable it there.

Configure settings
Configure the advanced creation settings.

Configure the advanced creation settings.

Click next to use the default settings. The default settings can be configured from the main menu under Settings->Configure &kdar;....

These configuration options are described later in this manual.

#### Save profile and start the creation process

Now you can save your settings as a profile.

Save profile
Save the profile and start the creation process.

Save the profile and start the creation process.

Click the Save profile button and choose a descriptive name. I recommend using the archive basename, without the ".1.dar" extension, for the profile name. &kdar; will automatically append ".kdar" to the profile name if you have not done so yourself. You will be able to restore this profile later when creating a new backup. Profiles are also useful for finding out which settings were used for creating an old backup. As a convenience, you can store the creation profile on your storage media along with the archive slices, although this is not necessary.

You can export the equivalent dar command by clicking on the Export dar command button.

When you're satisfied that everything is okay, click Finish. Your archive should be created. &kdar; will show you a progress dialog which displays the percentage of files processed, the media type and current archive slice size. Filenames are also displayed as they are added to the archive.

Advanced users can disable the Wizard and create archives using a compact dialog. From the Settings->Configure &kdar;... menu, unselect the Use Wizard for creating archives checkbox.

### Configuration options

To configure &kdar;'s options, select Settings->Configure &kdar;... from the main menu.

General settings
General settings.

General settings.

The settings dialog consists of several modules which can be chosen from the column on the left. Not all modules will be shown if you are configuring a creation or restore operation.

#### General

Here you can configure several settings of a general nature.

- "verbose output": determines whether to display status and error messages from &kdar;. If you disable this option, the creation progress bar will be disabled.

- "Use Wizard for creating archives": unselect this to create archives using a single, compact dialog. You can enter settings faster with this than using the Wizard once you're used to it.

- "Show splash screen on startup": unselect this to not show the &kdar; splash screen. This will reduce the startup time by a couple of seconds.

- "Archive storage directory": the default archive storage directory.

- "Allow overwriting of archives and files": select this option to allow files that currently reside on your filesystem to be overwritten by &kdar;.

- "Archive storage directory": the directory where archives are stored by default. This can be overridden by using a full path to an archive name.

- "Logging": you can select the logging level, and a logfile for archive operations.

#### Fonts

Select the fonts that you want to use for the various displays.

Font settings
Font settings.

Font settings.

#### Slicing

Settings associated with creating archive slices.

Slicing settings
Slicing settings.

Slicing settings.

- "Split archive": check this to create archives as slices of a given size.

- "Media type": the type of storage media each slice should fit on. Choose from the drop-down list. Selecting "Custom" will allow you to specify an arbitrary size for your slices.

- "Slice size": the size of each slice. This is calculated from the media type, or you can type a number here and the media will be updated automatically to "Custom".

- "First slice size": the size of the first archive slice. You can make this size smaller than the remaining slices. This is useful for saving space on the first storage medium to put DAR documentation, the statically-linked command-line dar binaries, and even your &kdar; creation profile.

- "Pause between slices": after each slice has been written, &kdar; will pause, prompting you whether to continue writing the next slice. This gives you an opportunity to burn the slice to a DVD or CD-R, for example. It is useful for when you have enough disk space for only one archive at a time.

- "Command to execute after completion of each slice": &kdar; can optionally run arbitrary shell commands after each slice has been written. Use this to run your DUC (Dar User Command) files, a CD burning program (k3b), or an secure-shell file transfer to a remote server. Include the full path to the script or binary file if it is not in your $PATH environment variable. Leave this command empty if you do not want to run any external programs.

  &kdar; can substitute the following DAR macros here:

  - %%: replaced by "%"

  - %p: the path to the archive slice

  - %b: the basename of the archive slice

  - %n: the number of the archive slice

  - %e: the extension of the archive slice (always "dar")

  - %c: the context in which the slice has been written or read

  For example, to start k3b with the archive slice loaded and ready to burn onto a CD, put the following in the command box:

  ``k3b` --datacd %p/%b.%n.%e`

  See the DAR manpage (man dar) for details on string substitution.

#### Compression

Compression can be switched on or off in general, or for individual file types, based on filename filters.

Compression settings
Compression settings.

Compression settings.

##### Compression type

- "bzip2": compress using the bzip2 block-sorting file compressor algorithm.

- "gzip": compress using the gzip Lempel-Ziv coding algorithm. You can specify a compression level here, with 1 being the least compression (fastest) and 9 being the most compression (slowest).

- "none": do not compress any files.

##### Compression filters

You can choose to exclude or include specific types of files to be compressed. Click the New button to create a new compression filter. This will bring up a dialog with a drop-list of standard file types which do not compress well. You can also choose to have "all of the above" file types to be excluded from compression. You can add your own file type, as the filter value is editable.

New compression filters
New compression filters.

New compression filters dialog.

Any compression filters that you add will be saved in &kdar;'s configuration file and will reappear when you start a new session of &kdar;.

"minimum size for compression": &kdar; will not compress any file whose size is less than the amount specified (default 150 bytes). Compression algorithms do not compress small files well because of the fixed overhead involved in the compression process. You can change this value depending on your experience with the compression process.

#### Cryptography

You can enable strong encryption for your archives in the Cryptography module. Currently, &kdar; supports the blowfish algorithm. Select the blocksize for encryption. The default value should be fine.

Cryptography settings
Configure the cryptography settings.

Cryptography settings.

If you have &kde;'s password wallet installed, you can store a default password for encryption and decryption. To change the password, click on Change password.

#### Directories

Directory filters allow you to fine-tune which directories &kdar; should include or exclude from the archive.

Directory settings
Configure directory filters.

Directory filters.

Click "new" to add a filter if you want to backup specific directories, or exclude specific directories. Notice that &kdar; automatically excludes the backup directory from your archive. Filters that are automatically controlled by &kdar; have type "auto" and are disabled from editing. In a full backup you also should exclude "/dev/pts" and "/proc", so add them from the dropdown list.

Choose directory filters.
Add directory filters.

Add directory filters.

Note, you might want to "Include a directory". In that case, only those directories that are included will be a part of the new archive. You can then exclude directories below those included directories.

Directories can be filtered using wildcards (known as "globbing"), i.e. "*", "?", "[", and "]". For example, to exclude all CVS directories from your archive enter "*/CVS/*" for the directory filter.

Along the same lines, you can include or exclude a specific filename by specifying its full path in the new directory dialog. If necessary, browse your filesystem for specific files by clicking the directory icon to the right of the input box.

Only subdirectories of the archive directory (the root) are suitable for filters. If you select a directory that is not a subdirectory of the root, then when you try to create the archive &kdar; will display a message asking you to remove that directory from filter list.

#### Files

File filters allow you to include or exclude files using wildcard matching.

File filters
File filters.

File filters.

For example, to exclude all files named "core", just add a new file filter named "core". Unlike directory filtering, all files of the given name will be filtered, now just a single particular one.

The new file filter dialog has several common file filters that you can select from a drop-list. You might want to exclude any files which end in "~", because these are generally backups of files. Add ".*~" to exclude hidden backups.

#### Filesystem

Here you can configure several settings related to the underlying filesystem.

Filesystem settings
Filesystem settings.

Filesystem settings.

- "disable user Extended Attributes": if you have "Extended Attributes" compiled into libdar and &kdar;, they can be disabled for users by selecting this option.

- "disable system Extended Attributes": system EA can be disabled for by selecting this option.

- "ignore user/group ID's": select this option to ignore user and group ID's during backup and restoration. This is useful for restoring archives from other filesystems, which may have user and group ID's that are not the same as the ones on your system.

- "ignore ext2 dump flag": &kdar; will not store files on an ext2 filesystem that have the "no dump" flag set, unless this option is selected.

#### Comparison

Comparing file dates
Comparing file modification dates.

Comparing file modification dates.

The hourshift value is used during restorations and differential creations. Apparently some filesystems, like Samba, change the dates of files during a transition to or from daylight savings time. This option is a workaround that considers two dates equal if they differ by the specified number of hours, or less. Set this to "1" if you have such a filesystem.

#### Restore

The following options affect the behaviour of archive restoration.

Restoration settings
Restoration settings.

Restoration settings.

- "do not delete files on disk": this option refers to differential archive restorations. The filesystem will be restored to the state it had at each reference backup, even if that means deleting files on the disk. Selecting this option prevents those files from being deleted during restoration.

- "only restore most recent or non-existing files": with this option enabled, files that currently reside on your filesystem will not be overwritten by older files that have the same path and filename."

- "Flat": all files in all subdirectories of the archive will be restored to the same root directory. The restored filesystem will contain no directories.

### Browsing archives

Open an archive, and click on the "+" in front of its name in the Archive browser to examine the contents of the archive.

File browser
Examine the archive contents using the browser.

Examine the archive contents using the browser.

Clicking on a + will show that directory's contents, while clicking on a - will hide those contents. Empty directories show <empty>.

The archive browser displays the following information about each item in the archive in a series of columns across the display:

- Filename: the item's filename. This may be a directory, a regular file, named pipe, character device, and so on.

- Permissions: unix file permissions, in ls -l format.

- User ID: tries to show the owner's name, but will fall back on the user ID number.

- Group ID: tries to show the group's name, but will fall back on the group ID number.

- Size: the file's size in bytes.

- Date: the file's last modification date.

- Status: status of the file in the archive. This indicates whether the file is in the archive ( [SAVED] ), is in a reference archive ( [InRef], which means this archive is an isolated catalog ), or is not in the archive ( [ ], which means that the archive is a differential one, and there was no change in the file since the previous backup ).

Right-clicking on an archive item pops up a context menu which allows you to restore, diff or test that item and its children (subdirectories and files).

Each column can be sorted by clicking on its header at the top. The default sort is by the "permissions" column, which puts directories first in alphabetical order, then files in alphabetical order. Dates can be sorted chronologically, and sizes can be sorted by value.

The order in which the columns appear can be customized. Left-click the header of a column and drag it to the right or to the left to reposition it with respect to its neighbors. &kdar; will remember this configuration.

A movable splitter separates the Archive browser from the Message window. You can change the relative size of the two windows by moving the splitter (left-click and drag up or down), even hiding one of the panels this way.

### Restoring archives

Select "Archive->Restore", then choose a directory to extract your archive into.

Restoring files
Restore files from the archive onto your filesystem.

Restore files from the archive onto your filesystem.

Individual files can be restored from the archive by right-clicking with the mouse on a file in the archive browser, and selecting Restore. You can select multiple files for restoration this way by holding down the <CTRL> key while left-clicking with the mouse.

You can select various restore options by clicking the configure button.

"Dry run": check this to perform a dummy restore, i.e. &kdar; will go through all the actions, but not actually restore any files.

### Isolating archive contents

A &kdar; archive stores information about its files at the end of the archive in a table of contents, or a catalog in dar lingo. When creating a differential backup based on an existing reference archive, &kdar; only needs to scan the reference archive's catalog to determine changes in filesystem with respect to the reference archive.

&kdar; can isolate the reference catalog into its own archive. The isolated catalog archive is almost equivalent to the reference archive, except that it contains none of the actual stored data. Since the isolated archive is much smaller than the reference archive, you can store it on your filesystem and use it for making differential backups, i.e. use the isolated archive as your reference archive.

Isolating an archive is just a matter of selecting Archive->Isolate, and providing a descriptive name. I recommend using the basename of the archive that you are isolating the catalog from, with -cat appended to it to indicate that this is a catalog archive.

You can open the isolated archive in &kdar; and display the contents. The status field will display [InRef] to indicate that the actual file data is stored in the reference archive. Currently, you have to open the appropriate reference archive in order to restore the data. A future version of &kdar; will handle this automatically.

### Comparing archives against a filesystem

Diff'ing an archive against the filesystem allows you to check whether the filesystem has changed since the archive was created. Any files which are different from those in the archive will be shown in the message window.

To diff an archive, select Archive->Diff from the main menu, and select the root directory which you want to compare with the archive data.

### Testing archive integrity

A critical part of making backups is testing the integrity of the backup on the final storage medium. &kdar; uses cyclic redundancy checks, or CRCs, to check the integrity of an archive.

With an archive already loaded into &kdar;, select Archive->Test from the main menu to begin the integrity check. This test is best performed by opening the archive directly from the storage medium on which it resides. It may take a while, but it is worth knowing that your data is intact.

NOTE: the archive integrity test does not guarantee that you will be able to restore your data onto a new disk. For example, if you try to restore a file which has extended attributes onto a filesystem which does not support extended attributes, you will not be able to restore the extended attributes. Another example would be if you upgraded your CD-ROM drive, and it could not read the old CD-R's that you made two years ago. Another possibility is that &kdar; might have a bug which prevents you from restoring a certain type of file, for example.

To maintain the highest probability of being able to recover from a catastrophic filesystem failure, perform a full restoration on another hard dive, partition, or storage device, to verify that you can perform complete restoration.

Read the document GOOD_BACKUP_PRACTICE in the dar source doc directory, for a good background on making reliable backups.

## Questions, Answers, and Tips

### Frequently asked questions

How do I exclude a specific file from being added to a new archive? The file filters exclude all files that have the same name, but I want to exclude only a specific one.

Use a directory filter to exclude a specific file from the archive. Type the filename, including the full path to the file, when adding a new directory filter.

I get a "spacer undeclared" error while trying to compile the source code:

    kdarConfigureDlg.cpp: In constructor `
     kdarConfigureDlg::kdarConfigureDlg(QWidget*, const char*, bool, unsigned
     int)':
     kdarConfigureDlg.cpp:81: error: `spacer11' undeclared (first use this function)
     kdarConfigureDlg.cpp:81: error: (Each undeclared identifier is reported only
     once for each function it appears in.)

From the toplevel source directory do this:

        % make -f admin/Makefile.common
        % configure (--options)
        % make clean
        % make

## Installation

### How to obtain kdar

You can download &kdar; from sourceforge here.

### Requirements

KDar requires the following libraries:

- KDE version > 3.3.x

- QT version > 3.3.x

- libdar API version > 3.0.0

- libz version > 1.1.4

- libbz2 version > 1.0.2

In order to compile KDar, you'll need a c++ compiler. g++ > 2.96 should work. In fact, you need to use the same compiler that your QT and KDE libraries were built with.

Redhat-9 users: You'll need several RPM's installed to compile &kdar;. Basically, if you can compile DAR, you can compile &kdar; if you have the correct QT and KDE libraries installed. See the file INSTALL in the top-level source directory for details.

### Compilation and Installation

Compiling kdar is very easy. The following should do it:

    $ ./configure
    $ make
    $ make install

That should do it! Add the `--enable-debug` switch if you need to have debugging messages turned on.

`configure` should be able to detect the necessary settings for your system. If not, you can specify options to `configure` to force particular features to be enabled or disabled. To see what options libdar is compiled with, run

    $ dar -V

and look for the following in the output:

    Using libdar 3.0 built with compilation time options:
    Extended Attributes support: NO
    Large files support (> 2GB): YES
    ext2fs NODUMP flag support : YES
    Special allocation scheme  : YES
    Integer size used          : 64 bits

To enable or disable largefile support (support for files larger than 2GB), pass the corresponding `--enable-largefile` or `--disable-largefile` switch to `configure`.

Note that if you are running one of the 32-bit or 64-bit versions of libdar, you need to pass the corresponding option to configure. e.g. to use the 64-bit version of libdar (libdar64), run

    % ./configure --enable-mode=64

Should you run into any problems, first do your homework and check

- the INSTALL file in the top-level &kdar; source directory,

- and then the &kdar;-users mailing list archives.

- A google search might turn up something helpful.

If you're still stuck, please report the problem to the kdar-users@lists.sourceforge.net