The retrieve command obtains copies of archived files from the Tivoli® Storage Manager server. You can retrieve specific files or entire directories.
Use the description option to specify the descriptions that are assigned to the files you want to retrieve.
Use the pick option to display a list of your archives from which you can select an archive to retrieve.
Retrieve the files to the same directory from which they were archived, or to a different directory. Tivoli Storage Manager uses the preservepath option with the subtree value as the default for restoring files.
Note: When
a directory is retrieved, its modification date and time is set to
the date and time of the retrieval, not to the date and time the directory
had when it was archived. This is because Tivoli Storage Manager retrieves
the directories first, then adds the files to the directories.
Note:
If you are using client Version
3.1.0.5 or later, the workstation name is part of the file name. Therefore,
if you archive files on one workstation and you want to retrieve them
to another workstation, you must specify a destination. This is true
even if you are retrieving to the same physical workstation, but the
workstation has a new name. For example, to retrieve the c:\doc\h2.doc file
to its original directory on the workstation, named star, you would
enter: dsmc retrieve c:\doc\h2.doc \\star\c$\
The
workstation named star has been renamed and the new name is meteor.
To retrieve the c:\doc\h2.doc file to meteor,
you would enter: dsmc retrieve c:\doc\h2.doc \\meteor\c$\
You
could also enter: dsmc retrieve c:\doc\h2.doc \\star\c$\
You
can enter the command in either of the preceding ways because if the
workstation name is not included in the specification, the local workstation
is assumed (meteor, in this case).





This command is valid for all clients.






>>-RETrieve--+------------+--+- --sourcefilespec---+------------> '- --options-' '- --"sourcefilespec"-' >--+------------------------+---------------------------------->< '- --destinationfilespec-'

>>-RETrieve--+------------+-------------------------------------> '- --options-' >--+- --sourcefilespec----------------------+-------------------> '- --{--filespacename--}--sourcefilespec-' >--+------------------------+---------------------------------->< '- --destinationfilespec-'




sourcefilespec



Specifies the path and file name that you want to retrieve. Use
wildcard characters to specify a group of files or all the files in
a directory.
sourcefilespec
Specifies the path and file name that you want to retrieve. Use
wildcard characters to specify a group of files or all the files in
a directory.
{filespacename}
Specifies the file space (enclosed in braces) on the server that
contains the files you want to retrieve. This name is the drive label
on the workstation drive from which the files were archived. 



destinationfilespec



Specifies the path and file name where you want the files to be
written. If you do not specify a destination, Tivoli Storage Manager restores
the files to the original source path. 


This
failure can also occur if you remove the virtualmountpoint option
from the dsm.sys file. In this case, you can
specify a different destination, or restore the original virtualmountpoint option
to the dsm.sys file, restart the client, and
try the command again.
destinationfilespec
Specifies the path and file name where you want the files to be
written. If you do not specify a destination, Tivoli Storage Manager restores
the files to the original source path. | Option | Where to use |
|---|---|
dateformat |
Client options file
(dsm.opt) or command line. |
![]() ![]() ![]() ![]() dateformat |
![]() ![]() ![]() ![]() Client user options
file (dsm.opt) or command line. |
| description | Command line only. |
| dirsonly | Command line only. |
| filelist | Command line only. |
| filesonly | Command line only |
![]() ![]() ![]() ![]() followsymbolic |
![]() ![]() ![]() ![]() Client user options
file (dsm.opt) or command line. |
| fromdate | Command line only |
| fromnode | Command line only. |
![]() ![]() ![]() ![]() ![]() fromowner |
![]() ![]() ![]() ![]() ![]() Command line only |
| fromtime | Command line only |
| ifnewer | Command line only |
| pick | Command line only. |
| preservepath | Command line only. |
replace |
Client options file
(dsm.opt) or command line. |
![]() ![]() ![]() ![]() replace |
![]() ![]() ![]() ![]() Client user options
file (dsm.opt) or command line. |
skipntpermissions |
Client options file
(dsm.opt) or command line |
skipntsecuritycrc |
Client options file
(dsm.opt) or command line |
subdir |
Client options file
(dsm.opt) or command line. |
![]() ![]() ![]() ![]() subdir |
![]() ![]() ![]() ![]() Client user options
file (dsm.opt) or command line. |
tapeprompt |
Client options file
(dsm.opt) or command line. |
![]() ![]() ![]() ![]() tapeprompt |
![]() ![]() ![]() ![]() Client user options
file (dsm.opt) or command line. |
timeformat |
Client options file
(dsm.opt) or command line. |
![]() ![]() ![]() ![]() timeformat |
![]() ![]() ![]() ![]() Client user options
file (dsm.opt) or command line. |
| todate | Command line only. |
| totime | Command line only. |




Task



Retrieve a single file named budget. retrieve /home/devel/projecta/budget
Task
Retrieve a single file named budget.fin. ret c:\devel\projecta\budget.fin




Task



Retrieve all files with an extension of .c from
the /home/devel/projecta directory. retrieve "/home/devel/projecta/*.c"
Task
Retrieve all files with an extension of .c from
the c:\devel\projecta directory. ret c:\devel\projecta\*.c
Task
Retrieve all files with a file extension of .c from
the \devel\projecta directory on the winnt file
space. ret {winnt}\devel\projecta\*.c




Task



Retrieve all files in the /home directory. retrieve /home/
Task
Retrieve all files in the c:\devel directory. ret c:\devel\*
Task
Retrieve files from the abc file space proj directory. ret {abc}\proj\*.*




Task



Retrieve all files with a file extension of .c from
the /home/devel/projecta directory to the /home/newdevel/projectn/projecta directory.
If the /projectn or the /projectn/projecta directory
does not exist, it is created. retrieve "/home/devel/projecta/*.c" /home/newdevel/projectn/
Task
Retrieve all files with a file extension of .c from
the c:\devel\projecta directory to the c:\newdevel\projectn\projecta directory.
If the \projectn or the \projectn\projecta directory
does not exist, it is created. ret c:\devel\projecta\*.c c:\newdevel\projectn\




Task



Retrieve files in the /user/project directory.
Use the pick option. ret "/user/project/*" -pick
Task
Retrieve files in the c:\project directory.
Use the pick option. ret c:\project\* -pick




Task



Retrieve all files that were archived from the /proj directory
with the description "2012 survey results". retrieve "/proj/*" -desc="2012 survey results"




Task



Retrieve archived file /home/devel/budget with
description "my budget" to the /dev/rmt1 tape
drive. mkfifo fifo
dd if=fifo of=/dev/rmt1&
dsmc retrieve -replace=yes -description="mybudget"
/home/devel/budget fifo
Task
Retrieve a file from the renamed file space Jaguar_OLD to
its original location. Enter both the source and destination as follows: ret Jaguar_OLD/user5/Documents/myresume.doc /Users/user5/Documents/
Task
Retrieve a file from the renamed file space \\your-node\h$_OLD to
its original location. Enter both the source and destination as follows: ret \\your-node\h$_OLD\docs\myresume.doc h:\docs\