Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The internal OS disks are the RAID1. The NFS disks are the RAID 6.

Restoring Files from Backup

(this is information from Lance Nakata)

Sorry for the delay. Here are a few examples using dsmc, the TSM
CLI interface. Note that the keyboard emulation is quite bad.
The default is overwrite mode; hitting the Insert key on your
keyboard will toggle insert mode. I often must use ctrl-h
instead of backspace to delete characters. The arrow keys might
be the easiest way to move around, but beware of the overwrite
mode.

Code Block

up arrow = display (and optionally run) previous command(s)
dn arrow = display (and optionally run) next command(s)
ctrl-l = move back a word

sudo dsmc incremental (start an incremental backup of /u1)
sudo dsmc (start dsmc in interactive mode. root access allows
you to restore anyone's files.)

Once you're in interactive mode (as root on suncatfs1):

Code Block

tsm> query filespace (list all file space names)
tsm> query backup /u1/ (list files/dirs in /u1) (note trailing slash)
tsm> query backup /u1/cpo  (list /u1/cpo directory)
tsm> query backup /u1/cpo/* (list files/dirs in /u1/cpo)
tsm> query backup /u1/cpo/ -subdir=yes (recursively list files/dirs in /u1/cpo)
tsm> query backup /u1/cpo/ -subdir=yes -inactive (recursively list files/dirs in /u1/cpo, including inactive copies)

It's better to narrow your search to a particular subdirectory,
then recover that subdirectory or files within it. You can
also narrow the timeframe using the -pitdate and -pittime
point-in-time options. It is recommended you create a
destination directory in advance and restore the files there
rather than writing back to the original location (unless that
original location is empty).

The next command is one line. It says to do a restore of a
backup, preserve the complete file path, recurse through the
source directory, use a point-in-time date of 03/04/2011 and a
time of midnight, restore source is /u1/cpo/test/, restore
destination is /u1/cpo/test.restore/. NOTE: both subdirs have a
trailing slash.

Code Block

tsm> restore -preservepath=complete -subdir=yes -pitdate=03/04/2011 -pittime=00:00 /u1/cpo/test/ /u1/cpo/test.restore/

If you want to pick which files to restore from the list above,
add the -pick option to the command line.

The previous night's backup log is in /var/adm/tsm/dsmsched.log.
It's a circular log set to max at 200MB in size. It will wrap
around once it hits that limit, which is set in the
/var/adm/tsm/dsm.sys file.

Full dsmc documentation is at
/afs/slac.stanford.edu/package/tsm/doc/tsm550_clientunix.pdf

There are many more options listed there. Practicing a few
restores is probably the best thing to do. Just make sure to
restore to a temp directory somewhere.