![]() |
![]() |
This section includes topics related to incremental and selective backups. You do not need to understand this information to use Tivoli Storage Manager for basic work.
When you back up and archive files, Tivoli Storage Manager 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, Tivoli Storage Manager stores the file in a file space named /home. If an 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/*"
Tivoli Storage Manager 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 locates the file named doc2 that was backed up after the virtual mount point was defined. However, it does not locate 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 explicitly specify the file space name by enclosing it in braces. For example:
dsmc query backup "{/home}/monnett/*" dsmc restore {/home}/monnett/doc1
If the 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, Tivoli Storage Manager looks for the file in the /home/monnett file space unless you specify the correct file space name. For example:
dsmc query backup "{/home}/monnett/*" dsmc restore {/home}/monnett/doc2
Note: You must explicitly specify the file space name 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/*"
Tivoli Storage Manager 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/*"
Tivoli Storage Manager 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.
When you request an incremental or selective backup, Tivoli Storage Manager backs up a file if all of the following requirements are met:
When you perform an incremental backup of your files, Tivoli Storage Manager also checks the following:
When you run an incremental or selective backup, Tivoli Storage Manager also backs up all directory information that is not already backed up. Directories are counted in the number of objects backed up.
Special file systems contain dynamic information generated by the operating system; they contain no data or files. The Tivoli Storage Manager client ignores special file systems and their contents. Special file systems include the following:
Tivoli Storage Manager 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 an Authorized User with an include option in the include-exclude options list. The selected management class must contain a backup copy group in order for the file to be backed up. See Chapter 7, Automating Tasks and Chapter 8, Understanding Storage Management Policies for more information on management classes, how an 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. Tivoli Storage Manager 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.
The following table shows symbolic link backup and restore functions along
with the action taken:
Table 13. 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 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 exist. | A directory is created in the directory in which 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. |
When you back up a file that is hard linked to another file, Tivoli Storage Manager stores both the link information and the data file on the server. If you back up two files that are hard linked to each other, Tivoli Storage Manager backs up the link information and only one copy of the data file.
When you restore a hard linked file, 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 was on your workstation, when you restore both files, they will be hard-linked 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, Tivoli Storage Manager will respect the current file system and not restore the hard link.
Problems can occur if you back up only one file of a set of hard-linked files. For example, files texta and textb are hard linked 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 hard links at the same time and restore those same files together.
When Tivoli Storage Manager connects a backup-archive client to an NFS file system, you can use either a hard mount or a soft mount. Tivoli Storage Manager 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.
Tivoli Storage Manager 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 back 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.
Tivoli Storage Manager 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 Tivoli Storage Manager. 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/ledger.*"
enclose the parameter containing the 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: |
---|---|
*.cpp | With an exe extension |
hm*.* | Starting with hm, regardless of extension |
hm* | Starting with hm, whether 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: |
---|---|
?.cpp | The extension exe with one, and only one, character in the file name |
hm?.cpp | 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 (?). Tivoli Storage Manager will recognize those characters only as wildcard characters.