Backups on CD
Chapter 1 Overview |
Just type backuponcd -s (directory) -e (excludelist) , where (directory) is the full path to the directory which you want to archive and (excludelist) is a grep-script.
The output of backuponcd -h is:
-s directory which is to archived
-e excludelist may be a empty file, usually a list of mountpoints,
view example in /etc/backuponcd/excludelist
-a archiver (optional) overrides your setting (archiver=..)
in /etc/backuponcd/global.rc
-rc global settings (optional).
Overrides built in parameter "-rc /etc/backuponcd/global.rc".
Must be full path to rc file.
|
If you want to generate a backup on a running system, some folders must be excluded, have a look on an example exclude list (see /usr/doc/backuponcd/samples/excludelist , Section 4.1).
The script generates a backup providing tar or afio relative to (directory) and stores it temporary in the backuppath, depending on your settings in /etc/backuponcd/global.rc , Section 4.2. The archive can have any length, it is splitted into smaller pieces and burned while the backup runs continuous.
This is done by using pipes and burning multisession CDs, so don't worry if the gzipped tarball of your system amounts 1.5 + Gbyte. In this case you need 3 CDs with a media cost of 6$ if you use CD-RW.
Extracting an archive looks like this:
cat /cdwriter/tar.gz.* | tar --compare --gzip --file=- | \
tee -a /tmp/logfile
|
while the filenames of the archive are tar.gz.00 , tar.gz.01 and so on.
A bit more complicated is reading a multisession backup:
# /usr/doc/backuponcd/samples/simple_read
# a very simple example how to read an archive stored on
# several CDs. Must be killed by typing ^C if reading is
# finished.
device="0,3,0"
rawdevice=/dev/cdrom
mountpt=/cdrom
while true; do
cdrecord dev=$device -eject > /dev/null 2>&1
echo -e "\a\n Please insert the (next) volume" > /dev/tty
read ans
mount -t iso9660 -o ro,noexec $rawdevice $mountpt
if test $? -eq 0; then
echo "Now reading the volume..." > /dev/tty
cat /cdrom/*gz*
else
echo -e "\a\n Mount failed." > /dev/tty
fi
umount $mountpt
done 2> /dev/tty < /dev/tty
|
The script is used as follows:
~/bin/simple_read | tar --compare --gzip --file=- | \
tee -a /tmp/logfile
|
BackupOnCd comes with longer shell scripts which recognize multi- and singlesession CD and type out better comments, know which volume is inserted and so on.
If you assume that burning does work similar you're right, it does (see Details, Chapter 3 if you are interested).
Backups on CD
|