Next Previous Contents

3. Introduction

Taper is a user friendly archive program especially designed for backing up to tape drives. It also supports backing up to files on a hard disk

It, I hope, overcomes the lack of programs available currently for Linux for user friendly archiving.

Tar/cpio, apart from having an unfriendly user interface, lack one essential feature that I needed - there was no information stored in the beginning of the archive about what files were on the archive. The only way to get such a list was to traverse the whole archive, getting cpio/tar to print out a list of files that it found. With a 250mB archive, this could easily take 5 min. It was a real hassle to maintain lists of files on all my tapes and it could take 20 min to locate a file if I didn't know which tape it was on - printing out file lists of each tape.

I solved this by maintaining an archive information file on the hard disk. This file contains all the information about files stored on the archive. When files are added to the archive, the archive information file is updated. This archive information file can be reconstructed from the archive should the file get deleted/corrupted/lost - it just takes time.

To speed access to the files, the info file cluster consists of four files - two main files and two indexes. The names of the main files are taper_x and taper_x.0, while the two indexes are taper_x.1 and taper_x.2. The files are placed in the default info file directory. Note that 'x' is the archive ID (see below).

Should you wish to restore an archive on a different machine than one to where the backup was made, you have two options

Since reconstructing the archive information file can take a while, the first method is recommended. Info files can be quite long and there are three of them. A short housekeeping file, a main file and an index file. When transporting info files, on the short file and the main file need be transported - the index file can be reindexed. Although these info files can be long, they compress very well - typically more than 10:1 so it is important that you have the compress info files preference ON.

Note, that as a security measure, archives created by one user cannot be read by another user, unless the archive information file is copied from the backup user's directory to the restore user's directory. Thus, if you want to make a backup and don't want others to be able to restore it, set your permissions on the archive information file as rw------- (which taper does by default). Note that this is not completely foolproof, since a restorer can run recreate info files and create the information file and then access the archive. It is more a deterrent rather than secure system.

The second problem with both tar and cpio was that using the floppy interface tape drive, you could not append files. The only way to append files was using a combination of tar and mt - a very clumsy and time consuming method of backing up.

Note that the archive device doesn't have to be a tape drive - it can be an ordinary file on a filesystem, or a floppy, or in fact, any file that the Linux can write to.

Each archive is given a unique archive ID (which is actually the system time that the archive was created). This is used to identify it.

Development of this system has been done using gcc and based on a Colorado Jumbo 250 drive using the ftape driver (v3.03). As I do not have access to any other tape drives, I don't know if it will work on other setups. If you have any problems, contact me an I'll see if I can help.

The main program is called taper.

Note that currently taper is not really designed for backing up more than about 30,000 files (unless you have a large amount of physical memory).

Next Previous Contents