Windows operating systems

Examples for restoring data using the command line

You can use the examples in this topic when you need to restore objects from Tivoli® Storage Managerserver storage.

The following table shows how to use some restore commands to restore your objects from Tivoli Storage Manager server storage.

Table 1. Command-line restore examples
Task Command Considerations
Restore the most recent backup version of the c:\doc\h1.doc file, even if the backup is inactive. dsmc restore c:\doc\h1.doc -latest If the file you are restoring no longer resides on your workstation, and you have run an incremental backup since deleting the file, there is no active backup of the file on the server. In this case, use the latest option to restore the most recent backup version. Tivoli Storage Manager restores the latest backup version, whether it is active or inactive. See Latest for more information.
Display a list of active and inactive backup versions of files from which you can select versions to restore. dsmc restore c:\project\* -pick -inactive If you try to restore both an active and inactive version of a file at the same time, only the active version is restored. See Pick and Inactive for more information.
Restore all files with a file extension of .c from the c:\devel \projecta directory. dsmc restore c:\devel \projecta\*.c If you do not specify a destination, the files are restored to their original location.
Restore the c:\project\doc\h1.doc file to its original directory. dsmc restore c:\project\doc\h1.doc If you do not specify a destination, the files are restored to their original location.
Restore the c:\project\doc\h1.doc file under a new name and directory. dsmc restore c:\project\doc\h1.doc c:\project\newdoc\h2.doc None
Restore the files in the e: drive and all of its subdirectories. dsmc restore e:\ -subdir=yes You must use the subdir option to restore directory attributes/permissions. See Subdir for more information about the subdir option.
Restore all files in the c:\mydir directory to their state as of 1:00 PM on August 17, 2002. dsmc restore -pitd=8/17/2002 -pitt=13:00:00 c:\mydir\ See Pitdate and Pittime for more information about the pitdate and pittime options.
Restore the c:\doc\h2.doc file to its original directory on the workstation, named star. dsmc restore c:\doc\h2.doc \\star\c$\
To restore the file to "star" which has been renamed "meteor", enter:
dsmc restore \\star\c$\
doc\h2.doc \\meteor\c$\
You could also enter:
dsmc restore \\star\c$\
doc\h2.doc c:\       
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 back up files on one workstation and you want to restore them to another workstation, you must specify a destination. This is true even if you are restoring to the same physical workstation, but the workstation has a new name.
Restore a file that was originally backed up from the diskette labeled "workathome" in the a: drive, and restore it to a diskette in the a: drive labeled "extra". dsmc restore {workathome}\doc\h2.doc a:\doc\h2.doc If you are restoring a file to a disk with a different label than the disk from which the file was backed up, you must use the file space name (label) of the backup disk instead of the drive letter.
Restore files specified in the c:\filelist.txt file to the d:\dir directory. dsmc restore -filelist=c:\filelist.txt d:\dir\ See Filelist for more information about restoring a list of files.
Restore all members of the virtfs\group1 group backup stored on the Tivoli Storage Manager server. dsmc restore group {virtfs}\group1 See Restore Group for more information.