Contents
1.
Introduction
This CD backup utility allows you to select from a number of backup
profiles that you previously defined and uses mkisofs and cdrecord
to actually write them to the CD.
It is not intended to be a general purpose interface for burning CD's, for
which there are a number of other excellent programs.
1.1
Future directions
This is an initial release, so only has the basic functionality.
Improvements would include allowing it to deal with incremental backups
and using multi session support to place them onto one CD.
2.
Configuration
First the file
/etc/cdbak.conf
is read if it exists.
Followed by
~/.cdbak.conf
and
$CDBAK
.
The contents of these files are merged with the later ones overriding
the contents of earlier ones.
2.2
Specifying backup profiles
The configuration file contains a number of backup profiles.
These consist of a set of directories to backup and various other
parameters that control the backup.
Each section in the file begins with the profile name in square brackets.
Following this are a number of parameters that control the backup.
For example:
[SYSTEM]
backup:
dir /boot
dir /etc
dir /root
dir /var
Here we have a profile named
SYSTEM
that specifies that everything under
/boot
,
/etc
,
/root
and
/var
will be backed up.
2.2.1
Backup directory list
The word
backup
is followed by a colon and then all following lines beginning
with spaces.
The
backup
item takes a series of
dir
commands; one per line for each directory that is to be backed up.
2.2.2
Controlling the directory layout on the CD
By default, files are placed on the CD at the same path as they
exist on your disk.
To change this you can place a second directory name after the first
which will become the name that is used on the CD.
#
# In this example, with the following specification, the file /etc/termcap
# would be written on the CD as /new/etc/termcap
#
backup:
dir /etc /new/etc
2.2.3
Excluding parts of the directory tree
Quite often there will be directories that you know
should not be backed up as they contain temporary files or files
that can be easily re-created.
You can exclude these with the
except
command in the configuration file.
[HOME]
#
# In this example everything under /home/steve is to be backed up
# apart from the directories build, tmp and kern.
# Also everything in the .netscape/cache and .netscape/xover-cache
# directories are excluded.
#
backup:
dir /home/steve, except build, except tmp,
except kern,
except .netscape/cache,
except .netscape/xover-cache
After
dir
is a comma and then the word
except
followed by a directory to exclude.
This directory is relative to the one given by
dir.
For example
dir /A , except B/C
would exclude
/A/B/C
from the backup.
Lines ending in a comma are continued on the next line.
2.3
The DEFAULT section
The default section is special and is not the name of a backup
profile.
In the
DEFAULT section you can place all parameters that do not change from
profile to profile.
If a parameter occurs in the
DEFAULT section and in a profile, then the value in the profile will be used.
- output
-
The file name that the backup is written to.
This file will be up to the size of a CD (650MB) and so should be on
a partition that has plenty of space.
output: /temp/backup.raw
- application_id
-
This is the name that will be put onto the CD header.
You can use it to identify the backup, and in this case
it should probably be overridden in each section.
- rockridge
-
Use Rock Ridge format. This should be set to
yes
unless you have a good reason not to.
rockridge: yes
- rockridge_dist
-
This passes the
-r
option to
mkisofs
rather than
-R
.
See the
mkisofs
documentation for exact details of what it does.
Basically this option is more useful for distributing software as
all the ownership and file mode information is removed.
For you own backups you would usually set this to
no.
- device
-
This is the device name that will be passed to
cdrecord.
See the
cdrecord
documentation for this.
device: 0,0
- speed
-
The CD writing speed.
speed: 2