tob - Tape Oriented Backup
tob [ -rc rcfile ] [ [ -f alternate_device ] [ -backups ] [ -check ] [
-find specification ] [ -full volume ] [ -fullcount volume ] [ -diff
volume ] [ -diffcount volume ] [ -inc volume ] [ -inccount volume ] [
-restore volume [ specification ] [ directory ]] [ -verbose ] [ -verify
tob is a simple yet configurable shell-script which, given a set of
‘volume definitions’, runs tar(1) or afio(1) based backups.
tob is a general driver for the making and maintaining of backups. It
makes full backups, differential backups (of the files which were
changed since the last full backup), incremental backups (of the files
which were changed since all previous backups), lets you determine the
size of the backup before actually making it, and maintains listings of
tob can create backups on either tape devices or your computer’s
filesystem. Backups stored in your filesystem are automatically
deleted once they reach a certain age.
This argument selects an alternative resource file instead of
the standard tob.rc which is read from the directory /etc/tob.
When present, this argument must be the first on the command
This argument selects an alternative device file for the backup
or restore operation. When present, this argument must be the
first, or second after -rc on the command line.
This flag will cause tob to show which backups were made and
when. This information is retrieved from backup listings in the
/var/lib/tob directory. Sample output of this command is:
VOLUME: test TYPE: Full DATE: Mar 7 10:09
VOLUME: test TYPE: differential DATE: Mar 7 11:18
VOLUME: unix TYPE: Full DATE: Feb 23 18:39
-check This argument will cause tob to check its environment settings,
to scan the resource file, and to report errors. When no errors
are found, tob will report which volumes are defined. This
argument may be useful when installing and testing tob.
This causes tob to scan its listing files and to report any
files which match specification. The specification argument is a
grep(1) expression, and may contain regular expression commands.
The -find command is useful to determine in which backup a given
file resides. E.g., the command
tob -find ’.*in’
lists all files ending with "in". The files can then be restored
from the reported backup. The command
tob -find .
will list all files of all volumes.
These arguments start a full backup of volume. The volume is
defined by its files in /etc/tob/volumes. The backup device,
backup program etc. are defined in the resource file.
These arguments cause tob to report the size (in bytes) of a
full backup of volume. The backup is not actually made; only
its size is determined.
This causes tob to start a differential backup of volume. A
differential backup is only possible when a previous full backup
These arguments cause tob to report the number of bytes which
would be backed up during a differential backup. This command
may be useful to determine whether a differential backup should
be made yet.
This flag causes tob to start an incremental backup. This type
is only possible when a full backup exists and involves all
files which are changed since all the backups of the volume.
These arguments cause tob to report the number of bytes which
would be backed up during an incremental backup.
-restore [volume] [specification]
These flags cause tob to restore all files which match the
specification. The directory argument is optional; when present,
tob restores the files under the mentioned directory. By default
the files are restored under the current working directory. The
specification may contain wildcards; e.g., /etc/def* will
restore any files which start with "/etc/def". Wildcards may
have to be quoted to prevent shell expansion, as in:
tob -restore ’/etc/def*’
You can, e.g., restore all files which end in "myfile" with the
expression *myfile; no matter from which directory the files
were backed up.
Please note that some archivers prefer to get specifications
without the leading slash, e.g. ’etc/apache/*’. Arj is one
This command will list the contents of the backup device. Use
tob -verbose | grep expression to list only files on the backup
device which match expression.
This command lets tob verify the last full backup. This options
is only available for backups made with afio(1). The
differences found by afio(1) are reported on the standard
The tob script depends on the variables specified in this
resource file during its actions. The format of the resource
file is variable=value, defining names for various variables
which are used by tob. Comments can be present in the resource
file, when preceded by a hash-mark. The resource file follows
the standard /bin/sh syntax. Please see the examples supplied
Files in this directory define backup volumes. A volume name is
defined by a file name.startdir which contains the starting
directories of the backup. The format of this file is one
directory per line. No comments may occur in this file. E.g.,
if your configuration has two disk filesystems mounted on / and
/usr respectively, then a backup volume bothdisks which selects
both filesystems is defined by the following file
Since the default behavior of tob is to select only files from
one device and not to descend different devices, in this
scenario, if you provide a starting directory of / , then /usr
would not be backed up.
If your start directories have spaces or special characters in
them, they must be escaped for the bash shell, which generally
means a backslash in front of spaces:
/windows/Documents\ and\ Settings/
A second file, name.exclude, can be created to indicate files to
exclude from a backup name. This file is optional. When
present, the exclude file must contain grep-expressions of the
names to exclude, one name per line. E.g., for a backup named
unix of the whole Unix filesystem it may be a good idea to
exclude the temporary files from /tmp and /usr/tmp. A possible
exclude file unix.exclude might then contain
Please consult grep(1) for regular expressions.
Files in this directory are used to store listings of backup
volumes made by tob. These files are managed internally by tob.
Each backup volume has one associated list file. It contains
information about name and path of each file, the time the file
was last changed, its owner, group and permissions, the inode,
and the number of hard links that point to it.
On Debian GNU/Linux, more documentation about tob is stored
here. Please see the text file tob.txt.gz or the postscript
version tob.ps.gz for a detailed description of tob.
On Debian GNU/Linux, several examples for tob resource files are
Stephen van Egmond <firstname.lastname@example.org>, based on previous work
by Karel Kubat <email@example.com>.
DEBIAN GNU/LINUX MAINTAINER
Dirk Eddelbuettel <firstname.lastname@example.org>.
tar(1), afio(5), grep(1).
September 15, 2002