ARCHIVED: Using Tivoli Storage Manager, how do I restore files from the command line?

This content has been archived, and is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable.
Note:
On December 31, 2016, UITS retired Tivoli Storage Manager backup services. For details, see ARCHIVED: About the retirement of Tivoli Storage Manager backup services.

Using the restore command

To retrieve backup copies of your files from a Tivoli Storage Manager (TSM) server or backupset, use the restore command. You can specify the source directory or individual file to restore, or you can choose the files from a list. You can also choose whether to restore the files to their original directory, or to a different location. By default, restore restores all subdirectories from the source you choose; to change this behavior, use the preservepath option.

Note:
If a file in the target location has the same name as a file in the source location, the file in the target location is overwritten by the file from the source location. If you want TSM to ask before replacing files, add -replace=prompt to the restore command.

Using the preservepath option

You can specify how much of the backup's path structure is reproduced with restore by using the preservepath option. Use -subdir=yes to reproduce the entire directory structure of the source location in the restoration. If directories in this structure do not exist in the target location, they are automatically created.

You can use preservepath with:

  • restore
  • restore backupset
  • restore group
  • retrieve
  • restore was

Examples

The examples below use the Unix and Mac OS X path notation. Be aware that the specific syntax of the paths may be different for other operating systems. In the examples, the server file space contains the following backup copies:

  /fs/h1/m1/file.a
  /fs/h1/m1/file.b
  /fs/h1/m1/l1/file.x
  /fs/h1/m1/l1/file.y
Command
Files and directories restored
dsmc res /fs/h1/m1/ /u/ann/ -preser=complete /u/ann/h1/m1/file.a
/u/ann/h1/m1/file.b
dsmc res /fs/h1/m1/ /u/ann/ -preser=nobase /u/ann/file.a
/u/ann/file.b
dsmc res backupset /fs/h1/m1/ /u/ann/ -su=yes -preser=nobase -loc=file /u/ann/file.a
/u/ann/file.b
/u/ann/file.x
/u/ann/file.y
dsmc res /fs/h1/m1/ /u/ann/ -preser=subtree /u/ann/m1/file.a
/u/ann/m1/file.b
dsmc res /fs/h1/m1/ /u/ann/ -preser=none /u/ann/file.a
/u/ann/file.b
dsmc res /fs/h1/m1/ /u/ann/ -su=yes -preser=complete /u/ann/h1/m1/file.a
/u/ann/h1/m1/file.b
/u/ann/h1/m1/l1/file.x
/u/ann/h1/m1/l1/file.y
dsmc res /fs/h1/m1/ /u/ann/ -su=yes -preser=subtree /u/ann/m1/file.a
/u/ann/m1/file.b
/u/ann/m1/l1/file.x
/u/ann/m1/l1/file.y
dsmc res /fs/h1/m1/ /u/ann/ -su=yes -preser=none /u/ann/file.a
/u/ann/file.b
/u/ann/file.x
/u/ann/file.y
Note:
For more on TSM, see the TSM 6.4 Information Center. In the left pane, click IBM Tivoli Storage Manager backup-archive clients.

This is document axsb in the Knowledge Base.
Last modified on 2018-01-18 16:14:14.