| Simple dar Guide (A. Halkola/D. Hudson) |
|---|
| dar
is not installed by default on AIfA
computers.
There is a copy installed locally at /aibn156_a/XRAY/software/dar-2.3.3/bin/dar You can also install the source code yourself or ask a system administrator to install it on your computer. The first step is to make a full backup followed by using cron to update the backup 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 the 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. Please see the cron
page
for an explanation of how to use cron to run differential backups
nightly. 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. If there are any questions please just come and ask me. Good luck! Aleksi Halkola |