![]() |
![]() |
[ | | | ]
Use Tivoli Storage Manager to restore backup versions of specific files, a group of files with similar names, or entire directories. Select the files you want to restore using file specification (file path, name, and extension), a directory list, or a subdirectory path to a directory and its subdirectories. UNIX socket files are skipped during restore, including socket files that were backed up with earlier versions of Tivoli Storage Manager.
All client restore procedures in this chapter also apply to the Web client, except the following:
See Starting a Web client session for information on starting the Web client.
Table 35 identifies tasks described in this chapter:
Table 35. Restore: Primary tasks
Your administrator determines how many backup versions Tivoli Storage Manager maintains for each file on your workstation. Having multiple versions of a file permits you to restore older versions if the most recent backup is damaged. The most recent backup version is the active version. Any other backup version is an inactive version. Every time Tivoli Storage Manager backs up your files, it marks the new backup version as the active backup, and the last active backup becomes an inactive backup. When the maximum number of inactive versions is reached, Tivoli Storage Manager deletes the oldest inactive version.
To restore a backup version that is inactive, you must display both active and inactive versions by clicking on the View menu-> Display active/inactive files item. To display only the active versions (the default), click on the View menu -> Display active files only item. If you try to restore more than one version at a time, only the active version is restored.
On the Tivoli Storage Manager command line, use the inactive option to display both active and inactive objects. See Inactive for more information.
To restore backup versions of individual files or subdirectories:
To search:
To filter:
Use the restore command to restore files. See Restore for more information about the restore
command. Table 36 shows examples of using the restore
command to restore objects from Tivoli Storage Manager server storage.
See Restore for additional examples.
Table 36. Command line restore examples
Task | Command | Considerations |
---|---|---|
Restore the most recent backup version of the /home/monnett/h1.doc file, even if the backup is inactive. | dsmc restore /home/monnett/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 "/user/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 the /home/monnett/h1.doc file to its original directory. | dsmc restore /home/monnett/h1.doc | If you do not specify a destination, the files are restored to their original location. |
Restore the /home/monnett/h1.doc file under a new name and directory. | dsmc restore /home/monnett/h1.doc /home/newdoc/h2.doc | None |
Restore the files in the /home file system and all of its subdirectories. | dsmc restore /home/ -subdir=yes | When restoring a specific path and file, Tivoli Storage Manager recursively restores all subdirectories under that path, and any instances of the specified file that exist under any of those subdirectories. See Subdir for more information about the subdir option. |
Restore all files in the /home/mydir directory to their state as of 1:00 PM on August 17, 2002. | dsmc restore -pitd=8/17/2002 -pitt=13:00:00 /home/mydir/ | See Pitdate and Pittime for more information about the pitdate and pittime options. |
Restore all files from the /home/projecta directory that end with .bak to the /home/projectn/ directory. | dsmc restore "/home/projecta/*.bak" /home/projectn/ | If the destination is a directory, specify the delimiter (/) as the last character of the destination. If you omit the delimiter and your specified source is a directory or a file spec with a wildcard, you will receive an error. If the projectn directory does not exist, it is created. |
Restore files specified in the restorelist.txt file to a different location. | dsmc restore -filelist=/home/dir2/restorelist.txt /home/NewRestoreLocation/ | 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. |
If you need to restore a large number of files, you can get faster performance by using the restore command instead of the GUI. In addition, you can improve performance by entering multiple restore commands at one time.
For example, to restore all the files in your /home file system, enter:
dsmc restore /home/ -subdir=yes -replace=all -tapeprompt=no
However, if you enter multiple commands for the directories in the /home file space, you can restore the files faster.
For example, you could enter these commands:
dsmc restore /home/monnett/ -subdir=yes -replace=all -tapeprompt=no dsmc restore /home/gillis/ -subdir=yes -replace=all -tapeprompt=no dsmc restore /home/stewart/ -subdir=yes -replace=all -tapeprompt=no
You can also use the quiet option with the restore commands to save processing time. However, you will not receive informational messages for individual files.
Note: If you already have the appropriate values set for the subdir, replace, tapeprompt, and quiet options in your client user options file, you do not need to include those options in the commands.
When you enter multiple commands to restore your files, you must specify a unique part of the file space in each restore command. Be sure you do not use any overlapping file specifications in the commands.
To display a list of the directories in a file space, use the query backup command. For example:
dsmc query backup -dirsonly -subdir=no /usr/
As a general rule, you can enter from two to four restore commands at one time. The maximum number you can run at one time without degrading performance depends on factors such as how much memory you have and network utilization.
The speed at which you can restore the files also depends on how many tape drives are available on the server, and whether your administrator is using collocation to keep file spaces assigned to as few volumes as possible.
For example, if /home/monnett and /home/gillis are on the same tape, the restore for /home/gillis must wait until the restore for /home/monnett is complete. However, if /home/stewart is on a different tape, and there are at least two tape drives available, the restore for /home/stewart can begin at the same time as the restore for /home/monnett.
If your administrator is using collocation, the number of sequential access media mounts required for restore operations is also reduced.
When you enter an unrestricted wildcard source file specification on the restore command and do not specify any of the options: inactive, latest, pick, fromdate, or todate, the client uses a different method for restoring files and directories from the server. This method is called no query restore because instead of querying the server for each object to be restored, a single restore request is sent to the server. In this case, the server returns the files and directories to the client without further action by the client. The client merely accepts the data coming from the server and restores it to the destination named on the restore command.
An example of an unrestricted wildcard file specification would be:
/home/mydocs/2004/*
An example of a restricted wildcard file specification would be:
/home/mydocs/2004/sales.*
The standard restore process (also known as classic restore) and the no query restore process are outlined below.
If the restore process stops because of a power outage or network failure, the server records the point at which this occurred. This record is known to the client as a restartable restore. It is possible to have more than one restartable restore session. Use the query restore command to find out if your client has any restartable restore sessions in the server database.
You must complete a restartable restore before attempting further backups of the file system. If you attempt to repeat the restore that was interrupted or try to back up the destination file space, the attempt will fail because you did not complete the original restore. You can restart the restore at the point of interruption by entering the restart restore command, or you can delete the restartable restore using the cancel restore command. If you restart the interrupted restore, it will restart with the first transaction, which may consist of one or more files, not completely restored when the interruption occurred. Because of this, you may receive some replace prompts for files from the interrupted transaction which were already restored.
For more information on using the command line to begin restartable restores, see Restore. To perform restartable restores using the GUI, follow these steps:
Use a point-in-time restore to restore files to the state that existed at a specific date and time. A point-in-time restore can eliminate the effect of data corruption by restoring data from a time prior to known corruption, or recover a basic configuration to a prior condition.
You can perform a point-in-time restore of a file space, directory, or file. You can also perform a point-in-time restore of image backups. For more information see Backup Image.
Perform incremental backups to support a point-in-time restore. During an incremental backup, the client notifies the server when files are deleted from a client file space or directory. Selective and incremental-by-date backups do not notify the server about deleted files. Run incremental backups at a frequency consistent with possible restore requirements.
If you request a point-in-time restore with a date and time that is prior to the oldest version maintained by the Tivoli Storage Manager server, the object is not restored to your system. Files which were deleted from you workstation prior to the point-in-time specified will not be restored.
Notes:
When performing a point-in-time restore, consider the following:
To perform a point-in-time restore using the client GUI, use the following steps:
Note: If there are no backup versions of a directory for the point-in-time you specify, files within that directory are not restoreable from the GUI. However, you can restore these files from the command line.
You can start point-in-time restore from the command line client using the pitdate and pittime options with the query backup and restore commands. For example, when you use the pitdate and pittime options with the query backup command, you establish the point-in-time for which file information is returned. When you use pitdate and pittime with the restore command, the date and time values you specify establish the point-in-time for which files are returned. If you specify pitdate without a pittime value, pittime defaults to 23:59:59. If you specify pittime without a pitdate value, it is ignored.
Before you perform an image restore, consider the following:
You can use the verifyimage option with the backup image command to specify that you want to enable detection of bad sectors on the destination target volume. If bad sectors are detected on the target volume, Tivoli Storage Manager issues a warning message on the console and in the error log. See Verifyimage for more information.
If bad sectors present on the target volume, you can use the imagetofile option with the backup image command to specify that you want to restore the source image to a file. Later, you can use a 'dd' utility (available on Unix) or its equivalent to copy data from this file to a logical volume. See Imagetofile for more information.
Use the following procedure to restore an image of your file system or raw logical volume:
Considerations:
If you ran incremental-by-date image backup on a volume or image backups on a volume with incrementals, you can choose the Image plus incremental directories and files option. If you choose Image plus incremental directories and files, you can also select Delete inactive files from local to delete the inactive files that are restored to your local file system. If incremental-by-date image backup was the only type of incremental backup you performed on the file system, deletion of files will not occur.
Attention: Be absolutely sure that you need to perform an incremental restore because it will replace your entire file system with the image from the server and then restore the files that you backed up using the incremental image backup operation.
Use the restore image command to restore an image using the Tivoli Storage Manager command line client. See Restore Image for more information.
You can use the verifyimage option with the restore image command to specify that you want to enable detection of bad sectors on the destination target volume. If bad sectors are detected on the target volume, Tivoli Storage Manager issues a warning message on the console and in the error log. See Verifyimage for more information.
If bad sectors are present on the target volume, you can use the imagetofile option with the restore image command to specify that you want to restore the source image to a file. Later, you can use a 'dd' utility (available on Unix) or its equivalent to copy data from this file to a logical volume. See Imagetofile for more information.
Your Tivoli Storage Manager administrator can generate a backup set (a collection of your active files that reside on the server) onto portable media created on a device using a format that is compatible with the client device.
It is possible to generate a backup set as a number of special files if the device class the Tivoli Storage Manager administrator specifies when creating it is file. These files can be stored locally (on the client) to provide more restore flexibility.
WAS and group backups can also be added to a backup set. See Group backup: Backing up files from one or more file spaces for more information about group backups. See Backing up the WebSphere Application Server (WAS) for more information about WAS backups.
Portable media can be used on devices such as a tape, CD-ROM, DVD, and Iomega JAZ or ZIP drives. Current device support information is available at the following Web site:
http://www.ibm.com/software/sysmgmt/products/support/IBMTivoliStorageManager.html
You can restore backup sets from the following locations:
Backup sets can provide you with instant archive and rapid recovery capability as described below:
Notes:
Tivoli Storage Manager considers a backup set as one object containing the whole file structure. You can restore the entire backup set or just select portions. The backup set media is self-describing and contains all the information required to perform a successful restore.
Use the GUI to restore an entire backup set only. The command line can be used to restore an entire backup set or individual files within a backup set. See Restore Backupset for information on how to use the restore backupset command.
Attention: Before you begin a restore, be aware that backup sets can contain data for multiple file spaces. If you specify a destination other than the original location, data from all file spaces are restored to the location you specify.
To restore a backup set, perform the following steps:
Your backup sets appear in the tree and are grouped by backup set description. Expand a backup set description to see the backup sets with that description.
Notes:
The restore backupset command restores a backup set from the server, a local file, or a local tape device. See Restore Backupset for more information
Use the location option with the restore backupset and query backupset commands to specify where Tivoli Storage Manager searches for a backup set during a query or restore operation. You can use this option to locate backup sets on the server or local files. Tapes that are generated on the server can be used locally by specifying the location option and either the file name or the tape device. See Location for more information.
Use the query backupset command to query a backup set from a local file, tape device, or the Tivoli Storage Manager server. The query backupset command displays the backup set name, generation date, retention, and description. See Query Backupset for more information.
You restore NAS file system images using the Web client or command line interface. For information on how to install and configure the Web client, see Configuring the Web client.
You can restore full or differential NAS file system images that were backed up previously. If you restore a differential image, Tivoli Storage Manager automatically restores the full backup image first, followed by the differential image. It is not necessary for a client node to mount a NAS file system to perform backup or restore operations on that file system.
For information on how to install and configure the Web client, see Configuring the Web client. To restore NAS file systems using the Web client GUI:
Notes:
Notes:
Considerations:
You can use the toc option with the include.fs.nas option in your client system options file (dsm.sys) to specify whether Tivoli Storage Manager saves Table of Contents (TOC) information for each file system backup. See Toc for more information. If you save TOC information, you can use Tivoli Storage Manager Web client to examine the entire file system tree and select files and directories to restore. Creation of a TOC requires that you define the TOCDESTINATION attribute in the backup copy group for the management class to which this backup image is bound. Note that TOC creation requires additional processing, network resources, storage pool space, and possibly a mount point during the backup operation. If you do not save TOC information, you can still restore individual files or directory trees using the restore node server command, provided that you know the fully qualified name of each file or directory and the image in which that object was backed up.
To restore NAS files and directories:
Notes:
Considerations:
Table 37 lists the commands and options you can use to restore NAS
file system images from the command line.
Table 37. NAS options and commands
Option or command | Definition | Page |
---|---|---|
query node | Displays all the nodes for which a particular administrative user ID has authority to perform operations. The authorized administrative user ID should have at least client owner authority over both the NAS node and the client workstation node they are using either from command line or from the Web client. | Query Node |
query backup | Use the query backup command with the class option to display information about file system images backed up for a NAS file server. | Query Backup |
query filespace | Use the query filespace command with the class option to display a list of file spaces belonging to a NAS node. | Query Filespace |
restore nas | Restores the image of a file system belonging to a Network Attached Storage (NAS) file server. | Restore NAS |
monitor process | Displays current backup and restore processes for all NAS nodes for which an administrative user has authority. The administrative user can then select one process to monitor. | Monitor Process |
cancel process | Displays current back up and restore processes for all NAS nodes for which an administrative user has authority. From the display, the administrative user can select one process to cancel. | Cancel Process |
delete filespace | Use the delete filespace with the class option to display a list of file spaces belonging to a NAS node so that you may choose one to delete. | Delete Filespace |
Regardless of client platform, NAS file system specifications use the forward slash (/) separator, as in this example: /vol/vol0.
Use the Web client GUI or command line client to restore full or differential image backups of a WebSphere Application Server if the Data Protection for WebSphere Application Server is installed. When you back up a WAS, file spaces are created on the Tivoli Storage Manager server with the naming convention WAS_INSTANCENAME (for the Application Server file space) and WAS_ND_INSTANCENAME (for the Network Deployment Manager file space).
Before you begin:
To restore the WebSphere Application Server::
Notes:
Notes:
Considerations:
To restore WAS objects from the Tivoli Storage Manager command line, use the restore was command. See Restore WAS for more information.
This section discusses some advanced considerations for restoring data. You do not need to understand this information to use Tivoli Storage Manager for basic work.
You can authorize another user on the same workstation or a different workstation to restore backup versions or retrieve archive copies of your files. This permits you to share files with other people or with other workstations that you use with a different node name. To authorize a user on another workstation to restore or retrieve your files, the other workstation must be running one of the UNIX clients and must be registered with your Tivoli Storage Manager server.
To authorize another user to restore or retrieve your files:
On the command line client, use the set access command to authorize another node to restore or retrieve your files. You can also use the query access command to see your current list, and delete access to delete nodes from the list. For more information about these commands, see:
After users grant you access to their files on the server, you can restore or retrieve those files to your local system. You can display another user's file spaces on the server, restore the other user's backup versions, or retrieve the other user's archive copies to your local file system.
To display another user's file spaces on the server, restore the other user's backup versions, or retrieve the other user's archive copies to your local drives:
If you are using commands, use the fromnode and fromowner options to indicate the node name and the name of the user who owns the files.
For example, to restore files to one of your own file systems that were backed up from a workstation named Node1 and owned by a user named Ann, enter:
dsmc restore -fromn=node1 -fromo=ann "/home/proj/*" /home/gillis/
Use the query filespace command to get a list of file spaces (see Query Filespace). For example, to get a list of file spaces owned by Ann on Node1, enter:
dsmc query filespace -fromn=node1 -fromo=ann
See Fromnode for more information about the fromnode option. See Restore for more information about using the fromnode and fromowner options with the restore command. Also seeRetrieve for more information about the retrieve command.
From a different workstation, you can restore or retrieve files you have already backed up from your own workstation. You must know the Tivoli Storage Manager password assigned to your node.
To restore or retrieve files to another workstation, use the virtualnodename option to specify the node name of the workstation from which you backed up the files. Virtualnodename cannot be set to the hostname of the machine. You can use the virtualnodename option when you start Tivoli Storage Manager or you can add the virtualnodename option to your client user options file dsm.opt. Use the virtualnodename option on the dsm or dsmj command if you are borrowing another user's machine and you do not want to update their client user options file.
Tivoli Storage Manager prompts you for the password for your original node. After you enter the correct password, all file systems from your original workstation appear in the Restore or Retrieve window. You can restore or retrieve files as if you were working on your own workstation.
Attention: When you use this method to access files, you have access to all files backed up and archived from your workstation. You are considered a virtual root user.
You can use the virtualnodename option in a command. For example, to restore your projx files, enter:
dsmc restore -virtualnodename=nodeone "/home/monnett/projx/*"
If you do not want to restore or retrieve the files to the same directory name on the alternate workstation, enter a different destination.
The considerations for retrieving files are the same as restoring files.
Tivoli Storage Manager can recover your files only if you can run the client. If the file system that contains the client is lost, you must reinstall the client before you can recover your files. If you also lose the file system that contains the operating system and communication software, you must recover them before you can connect to the server.
To protect yourself against these kinds of losses, you need to put together a set of installation media that you can use to restore your system to a state that lets you contact the server and begin recovering data. The installation media should contain:
The communication package you use determines what files you need. Consult your operating system and communication software manuals to set up your installation media.
If you also have the Tivoli Space Manager installed on your workstation, your installation media should include the space manager command line client. For information about restoring migrated files, see IBM Tivoli Storage Manager for Space Management for UNIX User's Guide, GC32-0794.
Note: Your administrator can schedule restore operations which can be very useful when you need to restore a large number of files.
Authorized User
If your Tivoli Storage Manager administrator gives you authority, you can delete entire file spaces from the server. You cannot delete individual backup versions that are kept on the server. When you delete a file space, you delete all the files and images, both backup versions and archive copies, that are contained within the file space. For example, if you delete the file space for your /home/monnet file system, you are deleting every backup for every file in that file system and every file you archived from that file system. Carefully consider whether you want to delete a file space.
You can delete file spaces using the Tivoli Storage Manager GUI or command line clients. To delete NAS file spaces, use the Web client or command line client.
To delete a file space using the GUI, perform the following steps:
You can also delete a file space using the delete filespace command. See Delete Filespace for more information. Use the class option with the delete filespace command to delete NAS file spaces. See Class for more information.