DAR (Data ARchive) style Backup

DAR documentation
DAR source code
KDAR source code

Simple dar Guide
(A. Halkola/D. Hudson/L. Lovisari)
dar is not installed by default on AIfA computers. You have to install locally the source code.
The first step is to make a full backup followed by a daily backup (e.g. every night). The nightly backups are differential and so only altered files will be backed up. To recover lost data, one needs to have all the backup files (*.dar) up to file that includes the data that the user wishes to recover.

There is also a kde GUI for dar called kdar that can be used to make and restore backups. It also exports the dar shell commands implemented by kdar. The following scripts were made in this manner.

Full Backup
The full backup can be done with this bash script. The below refers to such script.
This will create a backup file named something like
"/media/backup/halkola/halkola_2007-03-15_12:03:13_full.1.dar". which will contain a backup of "/user2/halkola/".

The -m flag indicates the minimum size (150 in this case) a file should have in order to be compressed.
The -Z flag indicates that those files that should not be compressed (regardless of size) for the archive. In this case files with *.gz or *.bz2 are not compressed since they are already compressed. The compression method in this case is bzip2 which is indicated by the -y flag.
Additonal options -X indcate the types of files (*.dar in this case) to be excluded from the archive and -P indicates the paths (.mozilla in this case) that are to be excluded in the archive.

Differential Backups
Once you have done a full backup, it can be used as a reference for a differential backup. The differential backup will only have those files in it which have changed. This script checks all the files in the most recent backup (whether full or differential) and makes a backup of new or altered files. Additionally it marks files that were deleted between the backups.

For a thorough explanation of all the different options have a look at the dar man page. For example one of the options that could be useful is one that allows the backup files to be split into several files so that they can be burned to dvd's etc.
Good luck!
Aleksi Halkola

Return to Software Page