Use TSM to maintain a set of backup versions of your file system or raw logical volumes on your workstation. You can recover these older file versions in the event those files are lost or damaged. This chapter covers different ways to back up files, and how to restore these files when you want them, and the difference between backing up and archiving files.
Note: | Files backed up or archived by an OS/390 UNIX backup-archive client can only be restored or retrieved to an OS/390 UNIX backup-archive client |
The following table contains tasks in this chapter:
All backup and restore procedures in this chapter also apply to the Web client, except those identified in "Using the Web Backup-Archive Client".
See "Starting A Web Client Session" for information about starting and using the Web client.
If you are a first-time user, or if you only back up files
occasionally, you may wish to use Figure 3 as a checklist of preliminary steps to consider before
performing a backup.
Figure 3. Preliminary Steps for Backing Up Files
|
|
---|---|
&box. | Decide whether you want to backup files or archive them. See "Do You Want to Back Up or Archive Files?" for more information. |
&box. | Do you plan to use the AFS or DFS backup client, or both. See "Using the AFS/DFS Backup Clients" for more information. |
&box. | Do you need to exclude files from space management services? See "Using an Include-Exclude Options File to Control Processing" for more information. |
&box. | Decide what type of backup you want according to your needs. See the following sections for more information: "Full Incremental", "Partial Incremental", and "Full Incremental Versus Partial Incremental" |
&box. | If a file is important, ensure that it is closed before backing it up. See "Backing Up Opened Files" for more information. |
&box. | If you are performing an image backup, ensure that you have accounted for unique considerations. See "Raw Logical Volume (Image) Backup" for more information. |
&box. | For further backup considerations, see "Backup: Related Topics". |
When TSM backs up or archives a file, it sends a copy of the file and its associated attributes to the server; however, backups and archives have different goals.
Backups protect against file damage. A sequence of backup versions is kept for each file on your workstation (the number of backup versions is set by your administrator), and older versions are deleted as newer versions are made.
Archive copies are more permanent. They maintain a file in a particular state indefinitely (although your administrator can limit how long archives are kept). They are useful if you need, for example, to go back to a particular version of your files, or if you want to delete a file from your workstation and retrieve it if necessary. For example, you might need to save spreadsheets for tax purposes, but because you are not using them, you do not want to leave them on your workstation . See Chapter 4, Archiving and Retrieving Files for more information about archiving and retrieving files.
Use backups to protect against unforeseen damage to your files, and archives for maintaining more permanent versions of your files.
The AFS/DFS backup clients are available on AIX workstations. TSM includes executable files for the graphical user interface and the command-line interface in non-AFS/DFS, AFS, and DFS versions.
If you perform a command-line backup of AFS or DFS files using the non-AFS/DFS versions, TSM backs up the files and saves standard UNIX access permissions and extended permissions, but does not back up AFS or DFS access control lists for directories. If you want TSM to back up AFS or DFS access control lists, or to recognize AFS or DFS virtual mount points, you must use the AFS or DFS versions of the executable files.
For more information see AFS/DFS Backup Clients, SH26-4085.
There may be files on your file systems you do not want to back up. These files may be core files, local caches of network file systems, operating system or application files that could be easily recovered by installing the program again, or any other files that you could easily rebuild.
A TSM authorized user on your workstation can use the exclude and include options in your include-exclude options file to tell TSM which files to exclude from backup processing.
If you have the Tivoli Space Manager client installed on your workstation (formerly called hierarchical storage manager), the exclude option excludes a file from both backup and space management services. Use the exclude.backup option to exclude a file from backup services only. Use the exclude.spacemgmt option to exclude a file from space management services only.
TSM honors the include-exclude options file for incremental and selective backups, and backs up any file that is not explicitly excluded. You do not need to use an include option to include specific files unless those files are in a directory you want to exclude.
You can also specify the include and exclude options in the dsm.sys file. For more information on creating an include-exclude options file, see Chapter 7, Creating an Include-Exclude File.
Your administrator might have set up schedules to back up files on your workstation automatically. See Chapter 5, Automating TSM Tasks for information on checking and running the schedules available to you. The following sections discuss how to back up files without using a schedule.
There are two types of incremental backup: full incremental and partial incremental.
Note: | UNIX socket files are skipped during back up. |
When you request an incremental backup, TSM backs up a file if all of the following requirements are met:
When you run an incremental backup, TSM also backs up all directory information. When you back up a file, the directories in the path in which that file is contained are also backed up. Directories are counted in the number of objects backed up.
A full incremental backup (also called an incremental backup), initially backs up all specified drives, directories and files, and thereafter, all new and changed files, thus maintaining current server storage of your workstation files according to your storage management policies. See Chapter 6, "Understanding Storage Management Policies" for more information about storage management polices.
To perform a full incremental backup select the Incremental (complete) option from the type of backup pull-down menu on the TSM backup window, or use the incremental command. You must specify one or more file systems to include in the back up.
During a full incremental, the client queries the server to determine the exact state of your storage as of your last incremental. TSM uses this information to:
A partial incremental backs up new and changed files but does not expire or rebind files on the server, and it ignores the frequency attribute of the copy group. There are two types of partial incremental backup:
Files added at the client after the last incremental backup, but with a modification date earlier than the last incremental, are not backed up.
Incremental-by-date updates the date and time of the last incremental at the server. If an incremental-by-date is performed on only part of a file system, the date of the last full incremental is not updated, and the next incremental-by-date will back up these files again.
Both full and partial incrementals back up new and changed files. An incremental-by-date takes less time to process than a full incremental, and requires less memory. However, unlike a full incremental, an incremental-by-date does not maintain current server storage of all your workstation files because:
For these reasons, if you have limited time during the week to perform backups, but extra time on weekends, you may want to maintain current server storage of your workstation files by performing a partial incremental backup on weekdays, and a full incremental backup on weekends.
When you back up your files, TSM also saves standard UNIX access permissions assigned to the files. Depending on your operating system, it also saves extended permissions. For example, for files on an AIX workstation, TSM saves access control lists.
If you use the AFS or DFS versions of the dsm and dsmc commands (dsmafs and dsmcafs for AFS, dsmdfs and dsmcdfs for DFS) to back up AFS or DFS files (on an AIX workstation only), TSM also saves the access control lists that exist for each AFS or DFS directory. If you perform a command-line backup of AFS or DFS files using the non-AFS/DFS versions, TSM backs up the files and standard UNIX access permissions, but does not save the AFS or DFS access control lists for directories. See Using the AFS/DFS Backup Clients for more information.
Note: If a TSM authorized user backs up files for a user, the user owns the backup versions of the files in storage. The TSM authorized user does not need to grant the user access to the backup versions.
If you want TSM to consider files for backup beginning with a specific directory within a file system, a TSM authorized user can define that directory as a virtual mount point (see Virtualmountpoint).
Defining a virtual mount point within a file system provides a direct path to the files you want to back up, thus saving processing time. It is more efficient than defining the file system with the domain option, and then using an exclude option in your include-exclude options file to exclude the files you do not want TSM to consider for backup. It also lets you store backups and archives for specific directories in separate file spaces in storage.
Note: | The backup-archive client does not recognize AFS/DFS volume mount points. You must install the AFS/DFS client. |
You can use the Estimate function to estimate the amount of time it takes to process files and directories. The estimated time is a rough calculation of the time it takes to transfer your data and is based on previous transfers of data between your workstation and the current server. The actual transfer time could be longer or shorter than the estimate due to factors like network traffic, system load on your workstation, or system load on the server.
Note: The Estimated Transfer Time is based on previous backup transfer rates so you must run at least one backup operation first. The Estimated Transfer Time filed reads N/A if no files are sent to or from the current TSM server.
Perform backups using the following instructions:
When TSM backs up a file space or other set of files, it attempts to improve performance and load balancing by using multiple sessions. This can result in as many as five sessions running at one time to read files and send them to the server.
The Web client and backup-archive client GUI provide a Task List window that displays information about files that are processing. The backup-archive command line displays similar information.
When a task completes, a Task Report window displays processing details. You can click the Help button in the Task Report window for information about the following processing statistics:
The command line displays the name of each file after it is sent to the server. If a file is not sent immediately, a progress indicator displays the file's progress.
Filtering a directory tree displays only files matching the filter criteria. You can also search to find the files you want to back up. Run backups using the procedure below:
To Search:
To Filter:
Root User
TSM enables you to back up an entire file system or raw logical volume as a single object from your local machine. TSM views this as a raw logical volume (or image) backup. An image backup can be useful if you want to do any of the following:
Image backup is supported on AIX 4.3, Solaris 2.6/7 and HP 11.0.
If copy serialization is static, ensure that no one is using the file system when you perform an image backup. If the file system is in use when TSM attempts to unmount it, the backup will fail. To ensure a consistent image, TSM remounts the file system in read-only mode before starting the backup. After the backup completes, TSM remounts the file system to its original state.
System files should not be included in an image backup because they cannot be unmounted.
Important: If your mounted file system has nested mount points, unmount them before attempting a backup or restore. Image backups cannot be performed on nested mount points.
The server stores and manages image backups in the same way as other objects are stored and managed. However, a unique object type is used to distinguish image backups.
With image backups, the whole image (not individual files) is assigned a management class. If you do not specify a management class, the default class is used for the entire file system. You can define policy sets, management classes and copy groups for an image, as well as exclude specific file systems from the image.
Use the backup image and restore image commands to perform backup and restore operations on a single volume.
Place an include.image entry in your include-exclude list to assign a management class to the image. Place an exclude.image entry in your include-exclude list to exclude a file system from being backed up.
You can perform an incremental-by-date image backup to back up files that have changed since your last image backup. The following restrictions apply:
For more information on commands and options related to image backups, see Chapter 10, "Using Commands" and Chapter 8, "Setting Common Options".
To create an image backup of your file system or raw logical volume, perform the following steps:
incremental backup
incremental-by-date backup
Following is an example of how an image backup might work.
| Client | Server |
Monday | Files 1, 2 and 3 reside here | An image backup is performed. (Assume a full incremental was also performed.) A list of files in the image is created on the server. |
Tuesday | File 4 is created. | Daily incremental is performed - including incremental for file 4. |
Wednesday | File 2 is deleted; file 3 is changed. | Daily incremental is performed - including incremental for file 3; list of files in image backup shows file 2 was deleted. |
Thursday | File 1 is deleted. | Daily incremental is performed; list of files in image backup shows file 1 was deleted. |
Suppose you want to use the image created on Monday to restore your file system as it appeared just after Thursday's incremental backup. TSM would use the following process:
This section discusses topics related to incremental and selective backups. You do not need to understand this information in order to use TSM for basic work.
When you back up and archive files, TSM stores the backups and archives in a file space in storage that has the same name as the file system or virtual mount point from which the files originated.
For example, if you have a file system named /home, and you back up a file named doc1 in the /home/monnett directory, TSM stores the file in a file space named /home. If a TSM authorized user later defines /home/monnett as a virtual mount point, any files you back up from the /home/monnett directory, such as doc2, are stored in a file space named /home/monnett. If you enter this command:
dsmc query backup "/home/monnett/*"
TSM looks for files in the /home/monnett file space. It always looks for a file in the file space with the longest name that matches the file specification you include in a command. It finds the file named doc2 that was backed up after the virtual mount point was defined. However, it does not find the file named doc1 because that file was backed up before the virtual mount point was defined, and the backup was stored in the /home file space.
To list or restore the doc1 file using a command, you must specify the file space name explicitly by enclosing it in braces. For example:
dsmc query backup "{/home}/monnett/*" dsmc restore {/home}/monnett/doc1
If the TSM authorized user subsequently removes the /home/monnett virtual mount point, and you then back up additional files in the /home/monnett directory, the backups are once again stored in the /home file space. For example, if you now back up a file named doc3 in the /home/monnett directory, it is stored in the /home file space. It is not stored in the existing /home/monnett file space.
However, because the /home/monnett file space already exists, when you try to query or restore the doc3 file, TSM looks in the /home/monnett file space for the file unless you specify the correct file space name. For example:
dsmc query backup "{/home}/monnett/*" dsmc restore {/home}/monnett/doc2
Note: You must specify the file space name explicitly only when there can be more than one resolution to the file specification.
For example, if the following file spaces exist in storage:
/home /home/monnett /home/monnett/project1 /home/monnett/project1/planning
Then enter:
dsmc query backup "/home/monnett/project1/planning/*"
TSM looks for files only in the /home/monnett/project1/planning file space, even if one or more of the other file spaces contains a path with the same name. But, when you enter one of the following:
dsmc query backup "{/home}/monnett/project1/planning/*" dsmc query backup "{/home/monnett}/project1/planning/*" dsmc query backup "{/home/monnett/project1}/planning/*"
TSM looks for files only in the /home file space, the /home/monnett file space or the /home/monnett/project1 file space, depending on which form you use.
You can use the selective or incremental command to perform a backup. When the incremental and selective commands complete, TSM provides statistics similar to those shown in the GUI's Task List window. Similar statistics are produced by the archive command. Statistics also display in the schedule log for scheduled commands. See Incremental and Selective for more information.
Selective: The selective command backs up specific files. Use wildcards to back up more than one file at a time. If you back up a directory, you can use the subdir =yes option to include all the subdirectories under that directory in the backup. For example, to back up the /home/monnett/proj directory and its subdirectories, enter:
dsmc selective /home/monnett/proj/ -subdir=yes
If a subdirectory is a mounted file system, TSM does not back up the files in that subdirectory when you use the subdir=yes option.
You can use more than one file specification on the selective command. For example, to back up the /home/monnett/h1.doc and /home/monnett/test.doc files, enter:
dsmc selective /home/monnett/h1.doc /home/monnett/test.doc
Incremental: You can run an incremental backup from the command-line using the incremental command. For example, to back up the /home file system, enter:
dsmc incremental /home
If you do not select the file systems to back up, TSM uses your default domain (see Setting Your Default Domain Using a GUI). Add file systems to the default domain with the domain option. For example, if your default domain contains file systems /home and /usr, back up those file systems plus the /mfg file system using:
dsmc incremental -domain="/mfg"
To start an incremental-by-date, add the incrbydate option:
dsmc incremental -incrbydate
When you start TSM, click Backup Domain from the Actions menu bar, or use the incremental command without indicating file systems, to automatically select the file systems in your default domain as the file systems to process. Your default domain is set with the domain option in your client user options file (see Domain). If you do not have the domain option set, the default domain is all local file systems.
For full incrementals, TSM considers a file changed if any of these items are different from the last backup taken:
When you request an incremental or selective backup, TSM backs up a file if all of the following requirements are met:
When you perform an incremental backup of your files, TSM also checks the following:
When you run an incremental or selective backup, TSM also backs up all directory information that is not already backed up. You can exclude a directory or files within a directory from backup services. Directories are counted in the number of objects backed up.
TSM uses management classes to determine how to manage your backups on the server. Every time you back up a file, the file is assigned a management class. The management class used is either a default selected for you, or one assigned to the file by a TSM authorized user with an include option in the include-exclude options file. The selected management class must contain a backup copy group in order for the file to be backed up. See Chapter 5, Automating TSM Tasks and Chapter 6, Understanding Storage Management Policies for more information on management classes, how a TSM authorized user assigns management classes to files, and storage management policies.
A UNIX symbolic link is a file that contains a pointer to another file or directory. TSM handles symbolic links differently than it does regular files and directories. In some operations, such as a backup, only the path information that the symbolic link contains is backed up. In other operations, such as archive, the file to which the symbolic link points is archived, but under the name of the symbolic link. For more information on how symbolic links are handled during an archive operation, see Archsymlinkasfile.
For directories, most operations are affected by the setting of the subdir option. If the subdir option is set to no, only the directory and the files it contains are affected. If the subdir option is yes, TSM recursively processes all files and directories in the directory tree.
The following table shows symbolic link backup and restore functions and
the action taken:
Figure 4. Symbolic Link Management Table for Backup and Restore
Function | Action Taken |
---|---|
Selective backup of a file. | Backs up the symbolic link only, the file is not backed up. |
Selective backup of a directory. | Backs up the directory only, the symbolic link is not backed up. |
Incremental backup. | Backs up the symbolic links only, files and directories pointed to are not backed up. |
Incremental backup with subdir=no. | Backs up the symbolic links only, files and directories pointed to are not backed up. |
Incremental backup with subdir=yes. | Backs up the symbolic links and directories and files they point to. |
Restore a symbolic link that points to a file. | The symbolic link is restored, regardless of whether the file the symbolic link points to still exists. |
Restore a symbolic link that points to a directory. | The symbolic link is restored, regardless of whether the directory the symbolic link points to still exists. |
Restore a symbolic link that points to a directory with subdir=yes, the directory still exists. | The symbolic link and files in the directory and subdirectories are restored. |
Restore a symbolic link that points to a directory with subdir=yes, the directory and symbolic link no longer exists. | A directory is created in the directory that the symbolic link resides and all files and subdirectories are restored to that directory, the symbolic link name is used as the new directory name. |
A hard link is established when two files point to the same data file. When you back up a file that contains a hard link to another file, TSM stores both the link information and the data file on the server. If you back up two files that contain a hard link to each other, TSM stores the same data file under both names, along with the link information.
When you restore a file that contains hard link information, TSM attempts to reestablish the links. If only one of the hard-linked files is still on your workstation, and you restore both files, TSM hard-links them together.
The one exception to this procedure occurs if you back up two files that are hard-linked together, and then break the connection between them on your workstation. The two files then contain separate data files. If you restore the two files from the server, TSM will respect the current file system and not restore the hard link.
Problems can occur if you back up only one file of a hard-linked pair. For example, files texta and textb contain a hard link to each other. You back up texta, then edit textb and make some changes. If you restore texta, the changes you made to textb will be lost.
To ensure that hard-linked files remain synchronized, always back up all files that have hard links to each other at the same time, and restore those same files together.
When TSM connects a backup-archive client to an NFS file system, you can use either a hard mount or a soft mount. TSM uses the nfstimeout option setting to determine how long to wait for an NFS system call to respond before timing out, this applies to hard and soft mounts. The default is 10 seconds.
You should be aware of the consequences of hard and soft mounts if the mount becomes stale (for example, if the server for the file system is not available).
When one of these events occurs, control returns to the calling program.
TSM looks for files that have changed between the start and the completion of the file's backup. Some files on your system may be in use, or open, when you try to back them up. Because an open file may change, a backup action might not reflect the correct contents of the file at a given time.
Consider if a file is important. Can you build the file again? If the file is not important, you may not want to back up the file. Or, if the file is important, a root user on your workstation can ensure the file is closed before TSM tries to back it up.
If your backups run on a schedule, a root user can use the preschedulecmd option to enter a command to close the file. For example, if the open file is a database, use the database's quiesce command to shut down the database. A root user can use the postschedulecmd option to restart the application that uses the file after the backup completes. If you are not using a schedule for the backup, ensure that you close the application that uses the file before you start the backup.
TSM can back up the file even if it is open and gets changed during the backup. This is only useful if the file will be usable even if it changes during backup. To back up these files, assign the files a management class with the serialization dynamic or shared dynamic. See Selecting a Management Class for Files and Displaying Information About Management Classes and Copy Groups for information.
You can use the operating system's wildcard characters in file specifications with TSM. These characters let you select groups of files that have similar names.
In a command, wildcard characters can only be used in the file name or extension. They cannot be used to specify destination files, file systems, or directories. When using wildcard characters in non-loop mode, as in
dsmc sel "/home/*"
enclose the parameter containing asterisk in quotes to ensure the system
does not interpret the wildcard character and produce unexpected
results. Wildcard character information is covered in the following
table.
* (Asterisk) | Zero or more characters that match all files: |
---|---|
*.exe | With an exe extension |
hm*.* | Starting with hm, regardless of extension |
hm* | Starting with hm, regardless if an extension exists or not |
*h*.* | With an h somewhere in the file name, regardless of extension |
? (Question mark) | One character that matches all files with: |
---|---|
?.exe | The extension exe that have one, and only one, character in their file name |
hm?.exe | Three-character names beginning with hm and that have the exe extension |
* ? (Asterisk and question mark) | Asterisk and question mark combinations matching: |
---|---|
??hm.* | All four-character file names ending in hm., no matter what extension they have. |
In a path name for a file specification, you cannot specify a directory whose name contains an asterisk (*) or a question mark (?). TSM will recognize those characters only as wildcard characters.
Use TSM 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 TSM.
If you have the TSM space manager client installed on your workstation (formerly called hierarchical storage manager), you can set the restoremigstate option to restore migrated and premigrated files to a migrated or resident state (see Restoremigstate).
Your administrator determines how many backup versions TSM maintains for each file on your workstation. Frequently, the administrator has TSM maintain more than one version of each file. Having multiple versions of a file lets you restore older versions in case the most recent backup is damaged.
TSM considers the most recent backup version to be the active version. The most recent backup version is considered an inactive version if the file was deleted or excluded at the client and an incremental backup was run. Any other backup version is considered an inactive version. If you try to restore both an active and inactive version of a file at the same time, only the active version is restored.
Every time TSM backs up your files, it marks the new backup version the active backup, and it changes what used to be the active backup to an inactive backup. When the maximum number of inactive versions is reached, TSM deletes the oldest inactive version.
dsmc query backup "/home/*" -inactive
To restore backup versions of individual files or subdirectories:
A point-in-time restore restores files to the state that existed at a specific date/time. A file created after that date is not restored; only the changes made before the date/time are restored.
Note: Your administrator must define copy group settings which permit enough inactive versions of a file to be maintained to guarantee a file can be restored to a specific date/time. If enough versions are not maintained, TSM restores the oldest available version of the file.
A point-in-time restore is supported on the file space, directory, or file level. When a point-in-time restore runs, files that were created on the client after the point-in-time date are not deleted. A point-in-time restore can eliminate the effect of data corruption, or recover a basic configuration to a prior condition.
Point-in-time restores are also supported on image backups. For more information see Backup Image.
Perform incremental backups on a Version 3 or higher server in order to support a point-in-time restore. The server is notified when files are deleted from a client file space or directory during an incremental backup. 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. A point-in-time restore will restore files deleted after the point-in-time date, but not files deleted before. TSM restores file versions from the most recent backup before the specified point-in-time date. Ensure the point-in-time you specify is not the same as the time and date that a backup was performed.
Point-in-time overrides object condition so that even if an object has an active backup from a later date, the previous inactive copy is returned.
A point-in-time restore can be started from the command-line client using the pitdate and pittime command-line options. These options are used with the query and restore commands. For example, when pitdate and pittime are used with the query backup command, the date and time values specified in the pitdate and pittime parameters are used to establish the point-in-time for which file information is returned. When pitdate and pittime are used with the restore command, the date and time values specified in the pitdate and pittime parameters are used to establish the point-in-time for which files are returned. If pitdate is specified without a pittime value, pittime defaults to 23:59:59. If pittime is specified without a pitdate value it is ignored.
To start a point-in-time restore from the gui, follow the steps below.
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. To authorize another user to restore or retrieve your files:
See Set Access, Query Access, and Delete Access for information on using commands.
The TSM node you are authorizing must be registered with your TSM server.
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 Nodeone and owned by a user named Monnett, enter:
dsmc restore -fromn=nodeone -fromo=monnett "/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 monnett on Nodeone, enter:
dsmc query filespace -fromn=nodeone -fromo=monnett
See Restore for more information about using the fromnode and fromowner options with the restore command. Also seeRetrieve about the retrieve command.
You can use the following procedure to restore an image of your file system or raw logical volume. If you have run progressive incremental backups and image backups on your file system, you can perform an incremental restore of the file system to update the original image with individual files that were backed up after the last image back up. Optionally, if files were deleted after the original backup, the incremental restore can delete those file from the base image.
Note: | Incremental backups and restores can be performed only on mounted file systems, not on raw logical volumes. |
To restore a backup of your logical volume or raw logical volume image, perform the following steps:
Transfer statistics may not match the file statistics if the operation was retried due to a failure such as a communications failure or session loss. The transfer statistics will show the bytes attempted to be transferred across all command attempts.
Your TSM administrator can generate a backup set (a collection of your active files that reside on the server) onto portable media that are supported by both the server and client.
Portable media can be used on devices such as a tape, CD-ROM, DVD, JAZ or ZIP drives. Current device support information is available at the following Web site:
http://www.tivoli.com/support/storage_mgr/tivolimain.html
You can restore backup sets from either of the following locations:
Note: | If you cannot restore a backup set from portable media, check with your TSM administrator to ensure that the portable media was created on a device using a format that is compatible with your device. |
TSM considers a backup set as one object containing the whole file structure. Files are copied down to the file space level, and you can perform partial restores. After a backup set is generated, it is not tracked by the TSM database. The media is self-describing and contains all the information required to perform a successful restore.
Backup sets can provide you with instant archive and rapid recovery capability as described below:
See Restore Backupset for information on how to use the restore backupset command.
Note: | Before you begin a restore, be aware that backup sets can contain data for multiple filespaces. If you specify a destination other than the original location, data from all filespaces is restored to the location you specify. |
To restore a backup set, perform the following steps:
This section discusses some advanced considerations for restoring data. You do not need to understand this information in order to use TSM for basic work.
Use the restore command to restore files. Indicate the file you want to restore and where you want to restore it. If you do not indicate a destination, the files are restored to their original location.
For example, to restore the /home/monnett/h1.doc file to its original directory, enter:
dsmc restore /home/monnett/h1.doc
To restore it under a new name, use:
dsmc restore /home/monnett/h1.doc /home/monnett/h2.doc
If the file you want to restore is not 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, you need to use the latest option to tell the server to restore the most recent backup version. If you do not want the most recent version, use the pick and inactive options to get a list of backups from which you can select.
For example, if you want to restore the latest version of the deleted file /home/monnett/h1.doc, enter:
dsmc restore /home/monnett/h1.doc -latest
Add the subdir=yes option to the command if you need to restore the files in a directory and all of its subdirectories. For example, if you are recovering an entire file system (the /home file system in this case), you can restore all of the files using:
dsmc restore /home/ -subdir=yes
Client functions such as point-in-time restore and restartable restores, use no query restore to address potential memory constraints. No query restore coexists with other restore protocols and is supported on all Version 3 servers and clients.
No query restore addresses potential memory constraints on the client. For clients with large filespaces the list of backed up files can become very large; too large for some clients to keep and sort in memory. No query restore gets its name from the fact that, when using this protocol, the client does not need to query the server for a list of backed up files, nor does the client need to perform a sort of the list of files returned.
When an entire directory or directory tree is restored, and the inactive, latest, pick, todate, and fromdate options are not specified on the restore command, TSM keeps track of which objects have been restored. If the restore process is interrupted for any reason, such as a power outage or network failure, you can restart the restore at the point of interruption by entering the restart restore command. It is possible to create more than one restartable restore session. Use the query restore command to display a list of your restartable restore sessions in the server database. The existence of a restartable restore inhibits further backups of that file system until the restartable restore is completed using the restart restore command or the restartable restore is dropped using the cancel restore command.
The differences between the standard restore process and the no query restore process are described below.
For more information on using the command line to begin restartable restores, see Restore. For help with performing restartable restores using a GUI, follow these steps:
From a different workstation, you can restore or retrieve files you have already backed up from your own workstation. You must know the TSM password for your original workstation.
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 which TSM is running. You can use the virtualnodename option when you start TSM or update the client user options file. Use the virtualnodename option on the dsm command if you are borrowing someone else's machine so you do not change their configuration.
TSM prompts you for the password for your original workstation. After you enter the correct password, TSM displays all file systems from your original workstation in the File Systems for Restore/Retrieve section of the File System Information window. Then you can restore or retrieve files as if you were working on your original 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.
TSM 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 TSM space manager installed on your workstation (formerly called the hierarchical storage manager), your installation media should include the space manager command line client. For information about restoring migrated files, see Using the UNIX Hierarchical Storage Management Clients.
Note: Your administrator can schedule restore operations which can be very useful when you need to restore a large number of files.
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 space, enter:
dsmc restore /home/ -subdir=yes -replace=all -tapeprompt=no
However, if you enter multiple commands for the directories in the /home file space, TSM 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 select to 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 TSM 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.
TSM authorized user
If your TSM administrator gives you authority, you can delete entire file spaces from 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 cannot delete individual backup versions that are kept on the server. If you do not need a file space:
You can also remove a file space using the delete filespace command.