4 Basic operation: running tbackup

Contents of this section

tbackup can only be run by root. Type su first if you are not logged in as the root user.

To make a backup, just type tbackup at the command line. The program will ask for parameters.

Tbackup more or less explains itself when running. Below is a transcript of a sample session. User input is indicated with ˆˆˆˆˆˆ.

It is probably a good idea to run tbackup yourself while reading this transcript.

(The transcript below was made with an earlier tbackup version, the output sometimes differs slightly from what you would get running version 0.9.)

The session starts by running tbackup from the command line:

#tbackup
 ^^^^^^^
First, tbackup needs to know which files you want to backup. There are several ways of choosing these files, each way is called a choose method.

Currently tbackup has three different choose methods: set, setrm, and one:

Available choose methods:
  1 set   -- back up a directory set
  2 setrm -- back up a directory set, then remove its contents
  3 one   -- one user specified file or directory and below
Enter method name or number ---> [set] one
                                       ^^^
tbackup always uses ---> to indicate a question. The string between [ and ] is the default answer, you can give this answer by just pressing enter.

For this demonstration, we use the one choose method. For making real backups you will probably use the set method. The set method is treated in a separate section below.

If you discover that you gave the wrong answer to a question, you can always safely abort tbackup by typing ctrl-C.

If all questions are answered and the backup begins you can still abort tbackup, but this will be a bit more messy; after pressing ctrl-C you may have to kill some processes that were created by tbackup, and clean up some temporary files by hand.

Back to our transcript. Choose method one now asks:

Type the name of the file or directory to back up. (e.g. /usr/src)
This must be a full pathname starting with / .
  All subdirectories will also be backed up.
  Symbolic links are not followed but will be stored as symbolic links.
 
file/directory name ---> /usr/src/txt
                         ^^^^^^^^^^^^ 
This will make a backup of the files in /usr/src/txt and every directory below.

Size in kilobytes: 2023        /usr/src/txt
Now you need to choose a pack method. This method packs all the files selected by the choose method into one archive. There are currently four pack methods supplied, see the list below. You need to have the afio program for using methods afio and afio0, tar for the tar method, and cpio for the tarcpio method.

Available pack methods:
  1 afio    -- pack files with afio, compress with gzip
  2 afio0   -- pack files with afio, do not compress
  3 tar     -- pack files with tar (no compress)
  4 tarcpio -- make a tar archive with cpio (no compress)
Enter method name or number ---> [afio] 
                                        ^(pressed enter)
You will probably always want to use the afio method, this is the one that produces fault tolerant compressed archives. tar and tarcpio are only there to make tbackup look more powerful. No `tar + compress' method is provided, as partially damaged compressed tar files are almost impossible to recover.

The write method writes the archive created by the pack method to a backup medium. The main purpose of tbackup is to write backups to floppy disks, and this is done with the floppy write method.

Available write methods:
   1 filedev -- write archive to file or device.
   2 floppy  -- write to msdos floppy disks with mtools
   3 tape    -- write to tape
   4 null    -- copy archive to the bit bucket.
Enter method name or number ---> [floppy] 2
                                          ^
Write to floppy drive number (0/1) ---> [1] 1
                                            ^
Use double or high density floppies (d/h) ---> [d] 
                                                   ^(pressed enter)
If you enabled them during installation, you will also get the options xd and xh (extended double and extended high densities) in the above question. See Section exdens (Extended floppy densities) for more information.

Use error correcting codes?---> (y/n) [y] 
                                          ^(pressed enter)
  Part size is 672 Kb.
In this case drive 1 is a 3.5" drive, so the backup is written to 720Kb floppies. Each floppy will hold 672 Kb of data, the remaining 48 Kb is used for an msdos directory structure, to store information about the backup set, and for the error correcting codes.

Always format inserted disks?---> (y/n) [n] 
                                             ^(pressed enter)
Verify after write to disk?---> (y/n) [n] 
                                           ^(pressed enter)

 [Creating directory /tmp/bulkdir for temporary storage.]
Now tbackup asks if it should make an index file of this backup. Making index files is useful if you plan on doing selective restores.

For the moment, we don't make an index file, we will cover them in the section on selective restores.

Make a backup index file ---> (y/n) [y] n
                                        ^
  [The backup progress will be displayed on virtual console 6]
If you are running tbackup under X or from a remote site, it creates an X window for showing the progress messages of the pack method. You can edit the /etc/tbackup/Config file to change the place where the progress is printed.

All parameters are set, and the backup begins.

Backup description:
    Backup of directory /usr/src/txt.
    (Filenames in archive relative to /usr/src)
    Made with tbackup (V0.8)
    by root@noodle, on Sat Jul 17 22:25:40  1993
 
Backup in progress...

 [Allocating space for temporary storage of floppy contents.]
Tbackup begins creating the first part of the backup set, and also prompts for a floppy:

--Insert an empty, formatted disk for part 1
  in drive 1 and press enter. (Type o for options.) 
                                                     ^(pressed enter)
Insert the first floppy disk and press enter. Typing o and enter will get you to the options menu. More about that later.

Tbackup will check if the disk you inserted in drive 1 is formatted in the right way, and wait until part 1 is ready to be written:

[waiting for part 1 to be completed]
If part 1 is ready, you see
Writing part 1 to drive 1 (i interrupts) ....

While part 1 is being written to floppy, tbackup is also preparing part 2. If your computer is fast enough (read Section perftune (Performance tuning) if it isn't) part two is ready by the time part one is completely written.

Finished writing part 1.
 
--Insert an empty, formatted disk for part 2
  in drive 1 and press enter. (Type o for options.) 
                                                     ^(pressed enter)
Writing part 2 to drive 1 (i interrupts) .....
You can type i to interrupt the write operation and try again. If you press i it will take a few seconds for it to be `noticed'. In rare cases, manually interrupting a failing write operation is much faster than waiting for the automatic error recovery.

Finished writing part 2.  [you can remove the floppy]

Part 2 turns out to be the last part of the backup set. After it is written, tbackup cleans up its temporary files and you get a shell prompt again.

Cleaning up...
 
Backup completed.
#

Next Chapter, Previous Chapter

Table of contents of this chapter, General table of contents

Top of the document, Beginning of this Chapter