Solaris Handbook for Sun Peripherals

ufsrestore Command

The ufsrestore command copies file systems from a tape to a hard disk. It can only copy file systems that were created with the ufsdump command.

You must use ufsrestore with one of these three options:

The following options are not mandatory:

Example:

The following example shows how to retrieve a file from tape interactively. The file will be written in the current directory (/disk2 in this example). A blocking factor of 96 is specified as well as the dump file (first tape drive) of /dev/rmt/0.


Note -

You must use the same blocking factor (or larger) when you retrieve or copy files from the tape to the hard disk as you did when you copied files from the hard disk to the tape.



example# cd /disk2
example# ufsrestore ibf 96 /dev/rmt/0
ufsrestore > ?
Available commands are:
  ls [arg] - list directory
  cd arg - change directory
  pwd - print current directory
  add [arg] - add `arg' to list of files to be extracted
  delete [arg] - delete `arg' from list of files to be
extracted
  extract - extract requested files
  setmodes - set modes of requested directories
  quit - immediately exit program
  what - list dump header information
  verbose - toggle verbose flag (useful with "ls")
  help or `?' - print this list
IF no `arg' is supplied, the current directory is used

The system responds with a ufsrestore prompt. If you type a question mark, a list of available arguments is displayed.

List the directories that are resident on the tape by typing ls.


ufsrestore > ls
4lib/     dict        mail    openwin      spool
5bin      games       man/    preserve     src
adm       include/    net     pub          tmp

Now add the files or directories to the list of files to extract with the add command:


ufsrestore > add man mail

In this example the man and mail files are added to the list of files to extract from tape.

Now extract these files from the tape. They will be written to your current working directory (/disk2 in this example).


ufsrestore > extract

Once all the desired files are extracted, exit the ufsrestore command with q:


ufsrestore > q