6. Restoring your data

The basic syntax for restoring your data is dsmc restore source-file destination-file. If the destination-file is omitted then TSM will restore the file(s) to their original location. Be aware that, as with backup, you cannot use wildcards in directory / folder names. By default, TSM will restore the most current active version of a file.

6.1. Restoring selected files

** Windows **

tsm> rest "C:\My Documents\Word docs\mydoc.doc"  "C:\My Documents\restore\" 
tsm> rest "C:\My Documents\Word docs\mydoc.doc"  "C:\My Documents\restore\myolddoc.doc" 

** Mac **

tsm> rest /Users/ians/myfile.txt  /Users/ians/restore/ 
tsm> rest /Users/ians/myfile.txt  /Users/ians/restore/myoldfile.txt 

** Linux/Unix **

tsm> rest /home/ians/myfile.txt  /home/ians/restore/ 
tsm> rest /home/ians/myfile.txt  /home/ians/restore/myoldfile.txt 

** Netware **

tsm> rest USR:ians/myfile.txt*  "USR:ians/restore/" 
tsm> rest USR:ians/myfile.txt*  "USR:ians/restore/myoldfile.txt" 

Note from the first example of each restore above that in order to specify a directory as a destination, you need a trailing / (slash) at the end of the destination-filespec. Otherwise TSM may overwrite a file of the same name. The second example demonstrates a filename in the destination-filespec.

Restores of single files cannot be restarted if interrupted. In this case you will need to restore the file afresh.

6.2. Restoring multiple files and directories

** Windows **

tsm> rest "C:\My Documents\Word docs\*"  "C:\My Documents\restore\" -su=yes

** Mac **

tsm> rest /Users/ians/projects/hsm41test/*  /Users/ians/projects/restore/ -su=yes 

** Linux/Unix **

tsm> rest /home/ians/projects/hsm41test/*  /home/ians/projects/restore/ -su=yes 

** Netware **

tsm> rest USR:ians/projects/tsm/*  "USR:ians/projects/restore/" -su=yes

Note that in order to restore a full directory and the contents of all its sub-directories you need the -su=yes option. It is always good practice to terminate the destination-filespec with a trailing / (slash) if the element in the destination-filespec is a directory.

As this restore is wild-carded, it can be restarted if interrupted due to user input (Ctrl-C), server error or communications error. Restartable restores can be queried via q rest and will restart at the point of interruption.

6.3. Restoring entire partitions

Essentially, the syntax is the same as in 'Restoring multiple files and directories' above. However, the obvious caveats are to ensure enough space in the destination partition and to allow enough time.

** Windows **

tsm> rest C:\*  D:\restore\" -su=yes

** Mac **

tsm> rest /Users/*  /tmp/restore/ -su=yes

** Linux/Unix **

tsm> rest /home/*  /tmp/restore/ -su=yes

** Netware **

tsm> rest USR:*  USR:restore/ -su=yes

As with 'Restoring multiple files and directories' above, this restore is wild-carded and thus can be restarted if interrupted.

6.4. Restoring old and/or deleted files

As with the GUI, TSM does not, by default, list or restore old and deleted inactive versions of files and directories. If you need to restore such a file, you need the -inactive -pick options. The -pick option, while not strictly necessary, causes TSM to display a list of files from which to pick. Issuing a restore as below will display the following pick window:

tsm> rest /home/ians/projects/*  /tmp/restore/ -su=yes  -inactive -pick

TSM Scrollable PICK Window - Restore

     #    Backup Date/Time        File Size A/I  File
   170. | 12-09-2011 19:57:09        650  B  A   /home/ians/projects/hsm41test/inclexcl.test
   171. | 12-09-2011 19:57:09       2.74 KB  A   /home/ians/projects/hsm41test/inittab.ORIG
   172. | 12-09-2011 19:57:09       2.74 KB  A   /home/ians/projects/hsm41test/inittab.TEST
   173. | 12-09-2011 19:57:09       1.13 KB  A   /home/ians/projects/hsm41test/md5.out
   174. | 30-04-2012 01:35:26        512  B  A   /home/ians/projects/hsm42125upg/PMR70023
   175. | 26-04-2012 01:02:08        512  B  I   /home/ians/projects/hsm42125upg/PMR70023
   176. | 27-04-2012 00:28:15        512  B  A   /home/ians/projects/hsm42125upg/PMR70099
   177. | 24-04-2012 19:17:34        512  B  I   /home/ians/projects/hsm42125upg/PMR70099
   178. | 24-04-2012 00:22:56       1.35 KB  A   /home/ians/projects/hsm42125upg/dsm.opt
   179. | 24-04-2012 00:22:56       4.17 KB  A   /home/ians/projects/hsm42125upg/dsm.sys
   180. | 24-04-2012 00:22:56       1.13 KB  A   /home/ians/projects/hsm42125upg/dsmmigfstab
   181. | 24-04-2012 00:22:56       7.30 KB  A   /home/ians/projects/hsm42125upg/filesystems
   182. | 24-04-2012 00:22:56       1.25 KB  A   /home/ians/projects/hsm42125upg/inclexcl
   183. | 24-04-2012 00:22:56        198  B  A   /home/ians/projects/hsm42125upg/inclexcl.dce
   184. | 24-04-2012 00:22:56        291  B  A   /home/ians/projects/hsm42125upg/inclexcl.ox_sys
   185. | 24-04-2012 00:22:56        650  B  A   /home/ians/projects/hsm42125upg/inclexcl.test
   186. | 24-04-2012 00:22:56        670  B  A   /home/ians/projects/hsm42125upg/inetd.conf
   187. | 24-04-2012 00:22:56       2.71 KB  A   /home/ians/projects/hsm42125upg/inittab
   188. | 24-04-2012 00:22:56       1.00 KB  A   /home/ians/projects/hsm42125upg/md5check
   189. | 24-04-2012 00:22:56      79.23 KB  A   /home/ians/projects/hsm42125upg/mkreport.020423.out
   190. | 24-04-2012 00:22:56       4.27 KB  A   /home/ians/projects/hsm42125upg/ssamap.020423.out
   191. | 26-04-2012 01:02:08      12.78 MB  A   /home/ians/projects/hsm42125upg/PMR70023/70023.tar
   192. | 25-04-2012 16:33:36      12.78 MB  I   /home/ians/projects/hsm42125upg/PMR70023/70023.tar
<U>=Up  <D>=Down  <T>=Top  <B>=Bottom  <R#>=Right  <L#>=Left
<G#>=Goto Line #  <#>=Toggle Entry  <+>=Select All  <->=Deselect All
<#:#+>=Select A Range <#:#->=Deselect A Range  <O>=Ok  <C>=Cancel

You are now in the pick interface and can select individual files to restore via the number to the left, scroll up or down via U and D as described at the bottom of each listing of files.

Remember to issue the destination-filespec with the original restore command if you want to prevent overwriting current versions of files with older versions.

Up: Contents Previous: 5. Backing up your data Next: 7. Restoring your data to another machine