![]() |
![]() |
[ | | | ]
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 4, Backing up your data.
All client archive and retrieve 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 38 identifies tasks described in this chapter:
Table 38. Archive and retrieve: Primary tasks
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 7, Automating tasks for information on checking and running the schedules available to you. The following sections cover how to archive files without using a schedule.
For the Motif GUI: 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 Tivoli Storage Manager 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.
The Java GUI does not have the estimate function.
You can archive a file or a group of files using file names, or you can select files that match your search criteria using a directory tree. Perform archives using the following procedure:
To search:
To filter:
You request archive services when you want to preserve copies of files in their current state, either for later use or for historical or legal purposes. You can archive a single file, a group of files, or all the files in a directory or subdirectory. After you archive a file, you can choose to delete the original file from your workstation. Use the archive command to archive files. See Archive for more information about the archive command.
Use the snapshotroot option with the archive command in conjunction with a third-party application that provides a snapshot of a logical volume, to associate the data on the local snapshot with the real file space data that is stored on the Tivoli Storage Manager server. The snapshotroot option does not provide any facilities to take a volume snapshot, only to manage data created by a volume snapshot. See Snapshotroot for more information.
Table 39 shows examples of using the archive command to
archive objects. See Archive additional examples.
Table 39. Command line archive examples
Task | Command | Considerations |
---|---|---|
Archive all files in the /home/proj1 directory with a file extension of .txt. | dsmc archive "/home/proj1/*.txt" | Use wildcards to archive more than one file at a time. |
Archive all files in the /home/jones/proj/ directory and delete the files on your workstation. | dsmc archive /home/jones/proj/ -deletefiles | Retrieve the archived files to your workstation whenever you need them again. See Deletefiles for more information about the deletefiles option. |
Archive the /home/jones/h1.doc and /home/jones/test.doc
files.
| dsmc archive /home/jones/h1.doc /home/jones/test.doc | If you specify the removeoperandlimit option with the archive command, the 20-operand limit is not enforced and is restricted only by available resources or other operating system limits. This allows you to specify more than 20 files on a single command. See Removeoperandlimit for more information about this option. |
Archive a list of files in the /home/avi/filelist.txt file.
| dsmc archive -filelist=/home/avi/filelist.txt | Use the filelist option to process a list of files. See Filelist for more information. |
Archive the /home/jones/ch1.doc file and assign a description to the
archive.
| dsmc archive /home/jones/ch1.doc -description="Chapter 1, first version" | If you do not specify a description with the archive command, the default is Archive Date:x, where x is the current system date. See Description for more information about the description option. |
Archive all of the files in the /home/jones/proj/ directory and its
subdirectories.
| dsmc archive /home/jones/proj/ -subdir=yes | See Subdir for more information about the subdir option. |
Use the v2archive option with the archive command to
archive only files in the /home/relx/dir1 directory.
| dsmc archive "/home/relx/dir1/*" -v2archive | Tivoli Storage Manager archives only files in the /home/relx/dir1 directory. Directories that exist in the path are not processed. See V2archive for more information about the v2archive option. |
Use the archmc option with the archive command to
specify the available management class for your policy domain to which you
want to bind your archived files.
| dsmc archive -archmc=ret2yrs /home/plan/proj1/budget.jan | See Archmc for more information about the archmc option. See Chapter 8, Understanding storage management policies for more information about management classes. |
Assuming that you initiated a snapshot of the /usr file system and mounted the snapshot as /snapshot/day1, archive the /usr/dir1/sub1 directory tree from the local snapshot and manage it on the Tivoli Storage Manager server under the file space name /usr. | dsmc archive /usr/dir1/sub1/ -subdir=yes -snapshotroot=/snapshot/day1 | Tivoli Storage Manager considers the snapshotroot value as a file space name. See Snapshotroot for more information. |
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 /home/jones/t.exe file, 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 Tivoli Storage Manager for basic work.
When you archive a file, Tivoli Storage Manager 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, Tivoli Storage Manager 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, Tivoli Storage Manager 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, Tivoli Storage Manager 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.
Use the archsymlinkasfile option to specify whether Tivoli Storage Manager archives the symbolic link and the file or directory it points to, or the symbolic link only. See Archsymlinkasfile for more information.
Table 40 shows symbolic link archive and retrieve functions and the
action taken:
Table 40. 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. | Tivoli Storage Manager will not retrieve as long as the symbolic link exists. |
When you archive files that are hard-linked, Tivoli Storage Manager archives each instance of the linked file. For example, if you archive two files that are hard-linked, Tivoli Storage Manager will archive the file data twice.
When you retrieve hard-linked files, Tivoli Storage Manager attempts to reestablish the links. For example, if you had a hard-linked pair of files, and only one of the hard-linked files is on your workstation, when you retrieve both files, they will be hard-linked. The one exception to this procedure occurs if you back up two files that are hard-linked and then break the connection between them on your workstation. If you retrieve the two files from the server, Tivoli Storage Manager will respect the current file system and not retrieve the hard link.
If you do not archive and retrieve all files that are hard-linked at the same time, problems will occur. To ensure that hard-linked files remain synchronized, archive all hard links 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 for restoring files. See Authorizing another user to restore or retrieve your files, Restoring or retrieving files from another client node, and Restore or retrieve files to another workstation.
To retrieve an archived file:
To search:
To filter:
You retrieve a file when you want to return an archive copy from the server to your workstation. You can retrieve a single file, a group of files, or all the files in a directory or subdirectory. When you retrieve a file, Tivoli Storage Manager sends you a copy of that file. The archived file remains in storage.
Use the retrieve command to retrieve files from from storage to
your workstation. Table 41 shows examples of using the retrieve
command. See Retrieve for additional examples, and detailed information
about the retrieve command.
Table 41. Command line examples of retrieving archives
Task | Command | Considerations |
---|---|---|
Retrieve the /home/jones/h1.doc file to its original directory. | dsmc retrieve /home/jones/h1.doc | If you do not specify a destination, the files are retrieved to their original location. |
Retrieve the /home/jones/h1.doc file under a new name and directory. | dsmc retrieve /home/jones/h1.doc /home/smith/h2.doc | None |
Retrieve all files from the /home/jones directory that end with the characters .bak to the /home/smith directory. | dsmc retrieve "/home/jones/*.bak" /home/smith/ | None. |
Use the pick option to display a list of archives from which you can select files to retrieve. | dsmc retrieve "/home/jones/*" -pick | See Pick for more information about the pick option. |
Retrieve a list of files specified in the retrievelist.txt file to their original directory. | dsmc retrieve -filelist=/home/dir2/retrievelist.txt | See Filelist for more information about retrieving a list of files. |
As with backing up files, Tivoli Storage Manager checks the include options in your include-exclude options list 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, Tivoli Storage Manager assigns the file the default management class. Tivoli Storage Manager 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 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 list.