Archiving and retrieving files is similar to backing up
and restoring files. Many of the windows and concepts are
similar. In this chapter, we cover the main archive and retrieve tasks,
but where windows and concepts are the same as for backup and restore see Chapter 3, Backing Up and Restoring Files.
To archive files, you need to specifically select the files to archive. You can select the files by using a file specification or by selecting them from a directory tree.
Your administrator might have set up schedules to archive certain 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 cover how to archive files without using a schedule.
You can use the estimate function to estimate the amount of time it takes to process your files and directories. The estimated time is a rough calculation of the time it takes TSM 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.
Archive a file or a group of files using file names. Or select only the files that match your search criteria using a directory tree. Perform archives using the following procedure:
To Search:
To Filter:
During a backup or archive, TSM uses a window to provide statistics on the backup or archive processing status.
You can delete archive copies if you decide you no longer need them. Unlike backup versions, you can delete individual archive copies without deleting the entire file space. To delete an archive copy:
If you are using commands, you can delete archive copies with the delete archive command.
For example, to delete the file /home/jones/t.exe, enter:
dsmc delete archive /home/jones/t.exe
This section covers some advanced considerations in archiving files. You do not need to understand this information in order to use TSM for basic work.
You can use wildcards to archive more than one file at a time. You can archive all the files in a directory, and you can use the subdir=yes option to include files in all subdirectories under that directory. Use the deletefiles option if you want TSM to delete the files from your local workstation after they are archived and committed to storage.
For example, to archive the files in the /home/jones/proj directory and the files in its subdirectories, enter:
dsmc archive /home/jones/proj/ -subdir=yes -deletefiles
You can use more than one file specification on the archive command. For example, to archive the /home/jones/h1.doc and /home/jones/test.doc files, use:
dsmc archive /home/jones/h1.doc /home/jones/test.doc
Use the description option to assign a description to the archive:
dsmc archive /home/jones/h1.doc -description="Chapter 1, first version"
When the archive command completes, TSM provides you with statistics similar to those shown in the Archive Status window. Similar statistics are produced by the incremental and selective commands. These also show up in the schedule log for scheduled commands. See Archive for more information.
When you archive a file, TSM saves standard UNIX access permissions assigned to the file. 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 are a user, and you archive a file to which you have read access, you own the archived copy of the file. You are the only user who can retrieve the archived file unless you grant access to another user.
When you archive a symbolic link, TSM archives the file to which the symbolic link points. It does not archive path information for the directory.
If you archive a symbolic link that points to a directory, TSM archives the files contained in the directory (and its subdirectories if the subdir option is set to yes) under the name of the symbolic link.
The following table shows symbolic link archive and retrieve functions and
the action taken:
Figure 4. Symbolic Link Management Table for Archive and Retrieve
Function | Action Taken |
---|---|
Archive of a file link. | Archives the file to which the symbolic link points. |
Archive of a directory link. | Archives the directory and its contents. |
Archive of a file with subdir=yes. | Archives the directory, its contents and contents of subdirectories. |
Archive of a directory with subdir=yes. | Archives the directory, its contents and contents of subdirectories. |
Archive of a symbolic link that points to a file or directory that does not exist. | Archives the symbolic link. |
Retrieve a symbolic link that points to file; the file and link exist. | Replaces the file if replace=y is set. |
Retrieve a symbolic link that points to file; the symbolic link no longer exists. | Retrieves the file replacing the file name with the symbolic link name, and places it in the directory where the symbolic link resided. |
Retrieve a symbolic link that points to a directory; the symbolic link and directory no longer exist. | A directory is created in the directory where 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. |
Retrieve a symbolic link that points to a directory; the symbolic link and directory still exist. | TSM will not retrieve as long as the symbolic link exists. |
When you archive a file that contains a hard link to another file, TSM stores both the link information and the data file on the server.
When you retrieve a file that contains hard link information, TSM attempts to establish the links again. If only one of the hard-linked files is still on your workstation, and you retrieve both files, TSM retrieves both files and hard-links the retrieved files.
The one exception to this procedure occurs if you archive 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 retrieve the two files from the server, TSM respects the current file system and does not restore the hard link.
Problems can occur if you archive only one file of a hard-linked pair. For example, files texta and textb contain a hard link to each other. You archive texta, and then edit textb and make changes. If you retrieve texta, the changes you made to textb are lost.
To ensure that hard-linked files remain synchronized, always archive all files that have hard links to each other at the same time, and retrieve those same files together.
Retrieve a file when you want to return an archive copy from the server to your workstation.
Many of the advanced considerations for retrieving files are the same as they are for restoring files. See Authorizing Another User to Restore/Retrieve Your Files, Restoring or Retrieving Another User's Files, and Restore or Retrieve Files to Another Workstation.
To retrieve an archived file:
This section discusses some advanced considerations for retrieving files. You do not need to understand this information in order to use TSM for basic work.
Use the retrieve command to retrieve files. Indicate the file you want to retrieve and the destination. If you do not indicate a destination, the files are retrieved to their original location. For example, to retrieve the /home/jones/h1.doc file to its original directory, enter:
dsmc retrieve /home/jones/h1.doc
To retrieve the /home/jones/h1.doc file under a new name, enter:
dsmc retrieve /home/jones/h1.doc /home/jones/h2.doc
Use the pick option to get a list of archives from which you can select. Also see Retrieve for more information.
As with backing up files, TSM checks the include options in your include-exclude options file to determine which management class to assign to your archived files. If you do not specifically assign a management class to a file with an include option, TSM assigns the file the default management class. TSM can only archive a file if the selected management class contains an archive copy group.
You can override the default management class by using the archmc option, or by selecting the management class from the Archive Options menu in the GUI.
For information on the various management class attributes used to manage your archives, see Displaying Information About Management Classes and Copy Groups. See Assigning a Management Class to Files for information about using the include-exclude options file.