Previous Table of Contents Next


Restoring Files Interactively

When restoring individual files and directories, it is a good idea to restore them to a temporary directory such as /var/tmp. After you verify them, you can move the files to their proper locations. You can restore individual files and directories to their original locations. If you do so, be sure you are not overwriting newer files with older versions from the backup tape.

Follow these steps to restore files interactively:

1.  Become superuser.
2.  Write-protect the tape for safety.
3.  Put the backup tape in the tape drive.
4.  Type cd /var/tmp and press Return. If you want to restore the files to a different directory, substitute the directory name for / var/tmp in this step.
5.  Type ufsrestore if /dev/rmt/unit and press Return. Some informational messages and the restore> prompt are displayed.
6.  Create a list of files to be restored:
  To list the contents of a directory, type ls and press Return.
  To change directories, type cd directory-name and press Return.
  To add a directory or file name to the list of files to be restored, type add file-name and press Return.
  To remove a directory or file name from the list of files to be restored, type delete file-name and press Return.
  To keep the mode of the current directory unchanged, type setmodes and press Return. Then type n and press Return.
7.  When the list is complete, type extract and press Return. Then, ufsrestore asks you which volume number to use.
8.  Type the volume number and press Return. If you have only one volume, type 1 and press Return. The files and directories in the list are extracted and restored to the current working directory.
9.  Type quit and press Return. The shell prompt is displayed.
10.  Use the ls -l command to list the restored files and directories. A list of files and directories is displayed.
11.  Check the list to be sure all the files and directories you specified in the list have been restored.
12.  Use the mv command to move the files to the proper directories.

In this example, the files backup.examples and junk are restored from the pubs directory:

# cd /var/tmp
# ufsrestore if /dev/rmt/Ø
ufsrestore > ls
.:
 lost+found/   pubs/

ufsrestore > cd pubs
ufsrestore > ls
 ./pubs:
 .Xauthority        .login              .profile          backup.examples%
 .Xdefaults         .mtdeletelog        .wastebasket/     core
 .cshrc             .openwin-init       Junk/             dead.letter
 .desksetdefaults   .openwin-init.BAK   backup.examples   junk

ufsrestore > add backup.examples
ufsrestore > add junk
ufsrestore > setmodes
set owner/mode for '.'? [yn] n
ufsrestore > extract
You have not read any volumes yet.
Unless you know which volume your file(s) are on you should start
with the last volume and work towards the first.
Specify next volume #: 1
set owner/mode for '.'? [yn] n
ufsrestore > quit
# ls -l
total 6
drwxrwxrwt   3 sys      sys          512 Mar 11 1Ø:36 ./
drwxrwxr-x  18 root     sys          512 Mar 1Ø 16:43 ../
drwxr-xr-x   2 pubs     staff        512 Mar 11 1Ø:11 pubs/
# pwd
/var/tmp
# cd pubs
# ls
./                ../               backup.examples   junk
#

Restoring a Single File from a Backup Tape (ufsrestore)

Follow these steps to restore a single file from a backup tape:

1.  Become superuser.
2.  Put the backup tape in the tape drive.
3.  Type cd /var/tmp and press Return. If you want to restore the files to a different directory, substitute the directory name for /var/tmp in this step.
4.  Type ufsrestore xf /dev/rmt /unit file-name and press Return. The x option tells ufsrestore to copy specific files or directories in the filename argument. The message set owner/mode for '.'? [yn] is displayed.
5.  Type n and press Return. Directory modes remain unchanged.
6.  Type the volume number where files are located and press Return. If there is only one volume, type 1 and press Return. The file is restored to the current working directory.
7.  Type ls -l file-name and press Return. A listing for the file is displayed.
8.  Use the mv command to move the file to the proper directory.

Creating Cache File Systems

You can use the Cache File System (CacheFS) to improve NFS server performance and scalability by reducing server and network load. CacheFS is designed as a layered file system that enables the system to cache one file system on another. In an NFS environment, CacheFS increases the client per server ratio, reduces server and network loads, and improves performance for clients on slow links such as Point-to-Point Protocol (PPP).


Previous Table of Contents Next