(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.

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):

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 SUBDIRECTORIES HAVE A TRAILING SLASH. IF YOU DON'T TYPE THIS THE COMMAND WILL IMMEDIATELY RETURN WITH NO ERROR.

NOTE: I THINK THE DATE FORMAT IS MM/DD/YYYY

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.

Query Database for Backed-Up Files

From Lance Nakata:

I spoke to Chris and mentioned the TSM database might be very busy and possibly slowing down restores. In addition, he might be able to accomplish the file comparison he's interested in by performing a TSM client query. For example:

NOTE: As usual with dsmc, the trailing slash on the directory name is important!

sudo dsmc query backup -inactive -subdir=yes /u1/alevoj/dtu/ > /var/tmp/alevoj.dtu

The -inactive option is required if the file or subdirectory is already deleted and marked as inactive. The -subdir=yes option displays all subdirectories recursively.

System Restore Performance

From running a restore over about 6 days ending on June 10, 2013:

Total number of objects restored:    59,457
Total number of objects failed:           0
Total number of bytes transferred:   225.82 GB
Data transfer time:                868,127.92 sec
Network data transfer rate:          272.76 KB/sec
Aggregate data transfer rate:        490.12 KB/sec
Elapsed processing time:           134:12:19
  • No labels