10 Running trestore

Contents of this section

To restore a backup you can use the command trestore.

Here is a sample transcript.

#trestore
 ^^^^^^^^
Available read methods:
  1 filedev    -- read archive from file or device.
  2 floppy     -- read from msdos floppy disks with mtools.
  3 floppypart -- read a part of a floppy archive
Enter method name or number ---> [floppy] 2
                                          ^
Read from floppy drive number (0/1) ---> [1] 1
                                             ^
Insert one disk from the backup set in drive 1 and press enter.
                                                (pressed enter)^
Now the floppy method reads a description of the backup set from the disk and shows it to you.

Backup description:
 
  Backup of directory /usr/doc.
  (Filenames in archive relative to /usr)
  Made with tbackup (V0.1 alpha prerelease)
  by root@noodle, on Mon Jul 19 10:54:07  1993
 
Restore parameters of this backup set:
  dea_choosemethod=one
  dea_onename=/usr/doc
  dea_packhome=/usr
  dea_unpackmethod=afio
  dea_readmethod=floppy
  pre_mdens=d
  pre_eccmethod=blexta08
  pre_psize=727040
Don't worry if you don't understand the meaning of the `restore parameters' above, they are mainly there for internal use.

Note that the filedev and tape methods do not offer the above information. If you write archives with filedev or tape you must record the necessary information (contents, pack method used, ...) yourself.

Press enter to use this backup set, ^C to abort.
                                                 ^(pressed enter)
 Part size is 710 Kb.

 [Creating directory /tmp/bulkdir for temporary storage.]
 [Space free in /tmp/bulkdir: 1746 Kb.]
Trestore needs enough temporary space to store one part, plus a safety margin of 100 Kb. If there is insufficient space, trestore will refuse to run.

This archive was packed with the `afio' method.
 
Available unpack methods:
  1 afio     -- unpack files with afio, uncompress files with gzip
  2 afio0    -- unpack files with afio. (no uncompress)
  3 selafio  -- selectively unpack files with afio, uncompress with gzip
  4 selafio0 -- selectively unpack files with afio. (no uncompress)
  5 seltar   -- selectively unpack files with tar (no uncompress)
  6 tar      -- unpack files with tar (no uncompress)
Enter method name or number ---> [afio] 
                                        ^(pressed enter)
Now the unpack method asks where you want to put the contents of the archive. You usually want to put them where they came from:

This archive was packed relative to the directory /usr.
Unpack archive in directory ---> [/usr] 
                                        ^(pressed enter) 
If you are using tbackup to transport files from one machine to another, you may want to unpack the files in another directory, say /var/incoming/. This way, the files
/var/incoming/doc/first.document
  ...
/var/incoming/doc/last.document
are created.

Protect newer files from overwriting?---> (y/n) [y] y
                                                    ^
A restore index file lists all files that are restored, plus possible unpacking error messages. There's not much sense in making such a file in most cases.

Make a restore index file ---> (y/n) [n] n
                                         ^
  [Creating restore progress window]
 
Restore in progress...
 
--Insert the disk with part 1 in drive 1
  and press enter. (Type o for options.) 
To show the error handling, we remove the disk from drive 1, and then press enter.
                                             ^(pressed enter)
Reading part 1 from floppy 1..........
head: /dev/fd1H720: I/O error
 
**ERROR**: no disk inserted, disk is not formatted, or disk is not
           formatted with the right density.
Now we get to the trestore options menu:

Enter one of the following commands:
                          (You may want to insert a new disk first.)
r  : retry reading part 1 from drive 1
s  : salvage readable data of part 1 from drive 1 and try to correct
     errors
q! : quit trying to read this part, continue with the next part
e! : indicate end of archive
The s command recovers all readable data from a disk with read errors and uses the error correcting codes to reconstruct as much unreadable data as possible.

The q! command can be used if a disk from the backup set is lost. e! can be used to abort the restore process. You need to use e! if the last disk of the backup set can't be read normally.

We reinsert the disk and type:

-->r
   ^
Reading part 1 from floppy 1..........
Finished reading part 1.  [you can remove the floppy]
 
Cleaning up...

Restore completed.
#
Here is a list of errors that are detected by the floppy read method.

Next Chapter, Previous Chapter

Table of contents of this chapter, General table of contents

Top of the document, Beginning of this Chapter