6. Retrieving your data
Unlike the TSM GUI, you cannot get a straight list of archived files which you can retrieve. As a result you will
probably wish to query the server for a list of files, before retrieving a (sub)selection of them. Basic queries are
listed in the examples above ( see section querying the server ). Having
done that, the basic syntax for archive file retrieval is
dsmc retrieve source-file destination-file.
If the destination-file is omitted then TSM will retrieve the file(s) to their original location. If a file
of the same name is found in the destination location, TSM will prompt you whether to overwrite or not the current
tsm> retr join.jpg
tsm> retr j*.*
tsm> retr "C:\My Documents\html-docs\Mac\"
tsm> retr "C:\My Documents\html-docs\Mac\" C:\retrieve # Wrong ! Retrieve function invoked. --- User Action is Required --- File '\\cles.oucs:c$\retrieve' exists tsm> retr "C:\My Documents\html-docs\Mac\" C:\retrieve\ # Correct !
tsm> retr "C:\My Documents\html-docs\Mac\" C:\retrieve\ -su=yes
By default TSM will create a subdirectory in the destination directory for each lowest level source directory, and
place files in there. Thus, in the example above, if there were two subdirectories new and
old under \html-docs\Mac\, then TSM would create two subdirectories named
new and old under C:\retrieve\. This behaviour can be modified by using
-preservepath= option - see the online help for worked examples of the four values this option
Where more than one version of a file has been archived, then a basic retrieve using just the file path will
cause TSM to retrieve each version of that file, starting with the earliest and ending with the most recent
archive copy. Once the earliest copy has been retrieved, TSM will prompt to overwrite it with each more recent
archive copy. To prevent this happening the
-description= option should be used in both the
query of archived files and the subsequent retrieval of files.
tsm> q ar /scratch/test1/j*.jpg -desc="Jenkins*" Size Archive Date - Time File - Expires on - Description ---- ------------------- ------------------------------- 2,411,227 28-06-2002 10:51:37 /scratch/test1/j1.jpg Never Jenkins 1st Initial Scan 2,411,227 30-06-2002 15:07:24 /scratch/test1/j1.jpg Never Jenkins 1st - 1st amend 2,411,227 01-07-2002 12:01:06 /scratch/test1/j1.jpg Never Jenkins 1st - 2nd amend 2,411,227 01-07-2002 12:01:06 /scratch/test1/j1.jpg Never Jenkins 1st Final Version 760,632 28-06-2002 10:51:37 /scratch/test1/j2.jpg Never Jenkins 2nd Initial Scan 760,632 28-06-2002 16:46:03 /scratch/test1/j2.jpg Never Jenkins 2nd - 1st amend 760,632 28-06-2002 17:18:54 /scratch/test1/j2.jpg Never Jenkins 2nd - 2nd amend 760,632 28-06-2002 17:22:28 /scratch/test1/j2.jpg Never Jenkins 2nd - 3rd amend 760,632 01-07-2002 12:01:06 /scratch/test1/j2.jpg Never Jenkins 2nd Final Version
tsm> retr /scratch/test1/j*.jpg -desc="Final Version"