IBM Tivoli Storage Manager, Version 7.1

Retrieve

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.

Mac OS X operating systems 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.
Windows operating systems Note:
  1. When a directory is retrieved, its modification date and time is set to the date and time of the retrieve, 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.
  2. An error occurs if you attempt to retrieve a file whose name is the same as the short name of an existing file. For example, if you attempt to retrieve a file you specifically named ABCDEF~1.DOC into the same directory where a file named abcdefghijk.doc exists, the retrieve fails because the Windows operating system equates the file named abcdefghijk.doc to a short name of ABCDEF~1.DOC. The retrieve function treats this as a duplicate file.
    If this error occurs, perform any of the following actions to correct it:
    • Retrieve the file with the short file name you specified to a different location.
    • Stop the retrieval, and change the name of the existing file.
    • Disable the short file name support on Windows.
    • Do not use file names that conflict with the short file naming convention. For example, do not use ABCDEF~1.DOC.
Windows operating systems 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).
AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems Mac OS X operating systems Windows operating systems

Supported Clients

This command is valid for all clients.

Mac OS X operating systems AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems Mac OS X operating systems

Syntax

Read syntax diagramSkip visual syntax diagram
>>-RETrieve--+------------+--+- --sourcefilespec---+------------>
             '- --options-'  '- --"sourcefilespec"-'   

>--+------------------------+----------------------------------><
   '- --destinationfilespec-'   

Windows operating systems

Syntax

Read syntax diagramSkip visual syntax diagram
>>-RETrieve--+------------+------------------------------------->
             '- --options-'   

>--+- --sourcefilespec----------------------+------------------->
   '- --{--filespacename--}--sourcefilespec-'   

>--+------------------------+----------------------------------><
   '- --destinationfilespec-'   

Parameters

AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems Mac OS X operating systems 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.
Windows operating systems 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.
Note: If you include filespacename, do not include a drive letter in the file specification.
Windows operating systems {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.
Use the file space name if the drive label name has changed, or if you are retrieving files that were archived from another node that had drive label names that are different from yours.
Note: You must specify a mixed or lowercase NTFS or ReFS file space name that is enclosed in quotation marks and braces. For example, {"NTFSDrive"}. Single quotation marks or quotation marks are valid in loop mode. For example: {"NTFSDrive"} and {'NTFSDrive'} are both valid. In batch mode, only single quotation marks are valid. The single quotation marks requirement is a restriction of the operating system.
AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems Mac OS X operating systems 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.
Note: If you do not specify a destination, Tivoli Storage Manager determines whether the original file system can be reached. If the original file system cannot be reached, Tivoli Storage Manager does not restore the file.

AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems 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.

Windows operating systems 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.
When you enter the destinationfilespec string, consider the following points:
  • If the sourcefilespec names a single file, the destinationfilespec can be a file or a directory.
  • If the sourcefilespec is wildcarded or if you specify the subdir=yes option, the destinationfilespec must be a directory and end with a directory delimiter (\).
Note: If the destination path or any part of it does not exist, Tivoli Storage Manager creates it.
Table 1. Retrieve command: Related options
Option Where to use
Windows operating systems dateformat Client options file (dsm.opt) or command line.
AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems Mac OS X operating systems 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
AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems Mac OS X operating systems followsymbolic Client user options file (dsm.opt) or command line.
fromdate Command line only
fromnode Command line only.
AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems Mac OS X operating systems Mac OS X operating systems fromowner Command line only
fromtime Command line only
ifnewer Command line only
pick Command line only.
preservepath Command line only.
Windows operating systems replace Client options file (dsm.opt) or command line.
AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems Mac OS X operating systems replace Client user options file (dsm.opt) or command line.
Windows operating systems skipntpermissions Client options file (dsm.opt) or command line
Windows operating systems skipntsecuritycrc Client options file (dsm.opt) or command line
Windows operating systems subdir Client options file (dsm.opt) or command line.
AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems Mac OS X operating systems subdir Client user options file (dsm.opt) or command line.
Windows operating systems tapeprompt Client options file (dsm.opt) or command line.
AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems Mac OS X operating systems tapeprompt Client user options file (dsm.opt) or command line.
Windows operating systems timeformat Client options file (dsm.opt) or command line.
AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems Mac OS X operating systems timeformat Client user options file (dsm.opt) or command line.
todate Command line only.
totime Command line only.

Examples

AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems Mac OS X operating systems Task
Retrieve a single file named budget.

retrieve /home/devel/projecta/budget

Windows operating systems Task
Retrieve a single file named budget.fin.

ret c:\devel\projecta\budget.fin

AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems Mac OS X operating systems Task
Retrieve all files with an extension of .c from the /home/devel/projecta directory.

retrieve "/home/devel/projecta/*.c"

Windows operating systems Task
Retrieve all files with an extension of .c from the c:\devel\projecta directory.

ret c:\devel\projecta\*.c

Windows operating systems 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

AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems Mac OS X operating systems Task
Retrieve all files in the /home directory.

retrieve /home/

Windows operating systems Task
Retrieve all files in the c:\devel directory.

ret c:\devel\*

Windows operating systems Task
Retrieve files from the abc file space proj directory.

ret {abc}\proj\*.*

AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems Mac OS X operating systems 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/

Windows operating systems 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\

AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems Mac OS X operating systems Task
Retrieve files in the /user/project directory. Use the pick option.

ret "/user/project/*" -pick

Windows operating systems Task
Retrieve files in the c:\project directory. Use the pick option.

ret c:\project\* -pick

AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems Mac OS X operating systems Task
Retrieve all files that were archived from the /proj directory with the description "2012 survey results".

retrieve "/proj/*" -desc="2012 survey results"

AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems Mac OS X operating systems 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
Mac OS X operating systems 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/

Windows operating systems 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\



Feedback