Photograph of DAT tape published on Wikipedia He is still in circulation software that relies on backing up your data files to DAT ( Digital Audio Tape ). Normally, this kind of software includes all the tools necessary to make and restore backups, but it happens sometimes that they need to perform the same operations working directly on the data stores, without - in other words - necessarily pass through the software generated them. Few lines of code to easily manage this type of transaction. For their implementation requires the following applications:

  1. tar
  2. m (or mt-st)
  3. flexbackup

These applications are often included in the base of most Linux distributions. If you are not in use on the Linux box, it will be sufficient to obtain and install their pacchettizzazioni. If you have problems with flexbackup, refer to the download page of the website http://www.flexbackup.org , where both the sources that the RPM packaging format.

After installing the application may need to load one or more kernel modules to the backup drive is recognized. This happens because the DAT is accessible as a SCSI drive, which happens in most cases. No dramas, in these cases it is sufficient to read up on kernel modules to load and run for each insmod. For example:

# insmod /lib/modules/2.6.22/kernel/drivers/scsi/aic7xxx_old.ko
# insmod /lib/modules/2.6.22/kernel/drivers/scsi/st.ko

Without this, we check first the status of the cassette unit ... Be warned that you specify. Working with Linux is basically only have 2 choices:

  1. / Dev/st0
  2. / Dev/nst0

The difference lies mainly in the fact that calling the second device will not rewind the tape. Normally I prefer the first solution. The command to check the status of the cassette, then, is as follows:

# mt -f /dev/st0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x25 (DDS-3).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN

To make daily backups of the configuration flexbackup advice that I attach below (see the file flexbackup.conf), since it avoids having to deal with indexes and other advanced features not always easy to implement and, ultimately, useless for use quotidiano.Sarà hours can back up all of the DAT directory you want using a simple script that I attach below. The script is launched from the command line and takes as its only argument the list of directories to be backed up. For example:

# ./run_flexbackup.sh "/etc /var /opt"

Once backed up, it will be easy to recover. It will be enough change to the directory where you want to copy the backup and run the command:

# flexbackup -extract

Enjoy!

Download the script and configuration file

Share this content:
  • del.icio.us
  • Google Bookmarks
  • Digg
  • Facebook
  • Technorati
  • MySpace
  • Twitter