Retrieve archive copies by using the command line
You retrieve a file when you want to return an archive copy from the server to your workstation. Some examples of how to retrieve archived files by using the command line are shown.
You can retrieve a single file, a group of files, or all the files in a directory or subdirectory. When you retrieve a file, the IBM® Storage Protect server sends you a copy of that file. The archived file remains in storage.
Use the retrieve command to retrieve files. The following table shows examples of using the retrieve command.
| Task | Command | Considerations |
|---|---|---|
| Retrieve the c:\doc\h2.doc file to its original directory. | dsmc retrieve
c:\doc\h2.doc |
If you do not specify a destination, the files are retrieved to their original location. |
| Retrieve the c:\doc\h2.doc file under a new name and directory. | dsmc retrieve
c:\doc\h2.doc c:\proj2\h3.doc |
None |
| Retrieve all files that are archived with a specific description to a directory named retr1 at a new location | dsmc retrieve
c:\* d:\retr1\ -sub=yes -desc="My first archive" |
None |
| Retrieve all files from the c:\projecta directory that end with the characters .bak to the c:\projectn directory. | dsmc retrieve c:\projecta\*.bak
c:\projectn |
None |
| Use the pick option display a list of archives from which you can select files to retrieve. | dsmc retrieve
c:\project\* -pick |
For more information about the pick option, see Pick. |
| Retrieve a file that is originally archived from the diskette that is labeled workathome on the a: drive, to a diskette in the a: drive labeled extra. | dsmc retrieve
{workathome}\doc\h2.doc a:\doc\h2.doc |
If you are retrieving a file to a disk that has a different label other than the disk from which the file was archived, use the file space name (label) of the archive disk rather than the drive letter. |
| Retrieve the c:\doc\h2.doc file to its original directory on the workstation, named star. | dsmc retrieve
c:\doc\h2.doc \\star\c$\ To retrieve the file to star, which
was renamed meteor, enter:
You can also enter: This example is valid because if
the workstation name is not included in the specification, the local
workstation is assumed (meteor, in this case). |
For the purposes of this manual, 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 requirement is true even if you are retrieving to the same physical workstation, but the workstation has a new name. |