Monday, November 19, 2007

Veritas Netbackup: Part 2- Selection Lists & NFS

NFS mount points have rules associated with them based on the client's configuration:

File-Path Rules for UNIX Clients
The general requirements for pathnames on UNIX clients are as follows:
  • Enter one pathname per line. NetBackup supports a maximum path length of 1023 characters on UNIX clients.
  • Start all pathnames with a slash (/).
  • You can use the following meta or wildcard characters in policy backup selection lists: *, ?, [ ], { }
The following are example UNIX file specifications that use this capability:
/home/.[a-zA-Z0-9]*
/etc/*.conf


To use meta or wildcard characters literally, precede them with a backslash (\). Assume, for example, that the brackets in the following pathname are used as literal characters: /home/abc/fun[ny]name

In the backup selection list, precede the brackets with a backslash as in
/home/abc/fun\[ny\]name

Note A backslash (\) acts as an escape character only if it precedes a meta or wildcard character. NetBackup normally interprets a backslash literally and it is a legal character to use in pathnames.

Notes on Backup Selection Lists for UNIX Clients

  • File paths that cross mount points or that the client mounts through NFS can affect the way that you must configure your backups. Before creating a backup selection list, familiarize yourself with the Follow NFS and Cross mount points attributes.
  • You can back up operating system, kernel, and boot files with NetBackup. You cannot, however, create bootable tapes. Consult your system documentation to create a bootable tape.
  • NetBackup never backs up the following:
    • NFS files or directories, unless you set Follow NFS.
    • Files or directories in a different file system if you do not set Cross mount points.
    • Files or directories with path lengths longer than 1023 characters.
    • Files or directories where the operating system does not return inode information (the lstat system call failed).
    • Directories that NetBackup cannot cd into.
    • On a disk managed by Storage Migrator, migrated files or directories where Storage Migrator does not return inode information (mig_stat fails). Note that NetBackup Server does not support Storage Migrator.
    • Socket special files (named pipes are backed up).
    • Locked files when mandatory locking is enabled by an application that currently has the file open.
    • Busy files. If a file is open, NetBackup backs up the last saved version of the file.
  • Exclude specific files from backups by creating an exclusion list on the client.
  • The BUSY_FILE_ACTION and LOCKED_FILE_ACTION options in the /usr/openv/netbackup/bp.conf file on the client offer alternatives for handling busy and locked files. See “NetBackup Configuration Options” on page 134 of the Netbackup Guide.
  • On Hewlett-Packard, AIX, Sequent, and Solaris 2.5 (and later) platforms, NetBackup backs up access control lists (ACLs).
  • NetBackup can back up (and restore) Sun PC NetLink files.
  • On IRIX 6.x and Digital Alpha platforms, NetBackup backs up extended file attributes.
  • On IRIX platforms, NetBackup backs up and restores extended attributes attached to XFS file system objects.
  • On DEC OSF/1 platforms, NetBackup backs up and restores extended attributes attached to files on AdvFS and UFS file systems.
  • By default, NetBackup backs up and restores Solaris 9 extended attribute files. The FlashBackup single file restore program (sfr) does not restore extended attribute files. (See “Backup and Restore of Extended Attribute Files and Named Data Streams” on page 119 of the Netbackup Guide.)
  • By default, NetBackup backs up and restores VxFS 4.0 named data streams. The FlashBackup single file restore program (sfr) does not restore extended attribute files. (See “Backup and Restore of Extended Attribute Files and Named Data Streams” on page 119 of the Netbackup Guide.)
  • On Hewlett-Packard and Solaris 2.5 (and later) platforms, NetBackup backs up VxFs extent attributes.
  • If there are one or more trailing spaces in a backup selection list entry and a matching entry is not found on the client, NetBackup deletes trailing spaces and checks again. If a match is still not found, NetBackup skips the entry and logs a message similar to one of the following in the NetBackup All Log Entries or Problems report:
    • TRV - cannot process path pathname: No such file or directory. Skipping
    • TRV - Found no matching file system for pathname
Symbolic Links to Files or Directories

For symbolic (soft) links, include the file path to the source file in your list in order to back up the actual data. If a file is a symbolic link to another file, NetBackup backs up only the link, not the file to which the link points. This prevents multiple backups of the source file.
Because symbolic links are restored only as a symbolic link to the source file, you must restore the source file along with the link in order to get the data.

Note: If NetBackup restores a symbolic link as root, it changes the owner and group back to the original owner and group. When NetBackup restores a UNIX symbolic link as a nonroot user, it sets the owner and group for symbolic links to the owner and group of the person doing the restore. This does not cause problems because when the UNIX system checks permissions, it uses the owner and group of the file to which the symbolic link points.

Hard Links to Directories
On most UNIX systems, only the root user can create a hard link to a directory. Some systems do not permit hard links and many vendors warn you to avoid using these links.
NetBackup does not back up and restore hard-linked directories in the same manner as it does files:
· During a backup, if NetBackup encounters hard-linked directories, it backs them up multiple times, once for each hard link.
· During a restore, NetBackup restores multiple copies of the hard-linked directory contents if the directories do not already exist on the disk. If the directories exist on disk, NetBackup restores the contents multiple times to the same disk location.

Hard Links to Files
A hard link differs from a symbolic link in that it is not a pointer to another file, but is actually two directory entries pointing to the same inode number.

During a backup, if the backup selection list includes hard-linked files, the data is backed up only once, using the first file name reference found in the directory structure. If a second or subsequent file name reference is found, it is backed up as a link to the name of the first file. This means you get only one backup copy of the data, regardless of whether you include one or multiple hard links. You can include any of the paths that are hard links to the data in order to back up the data.

During a restore, if all of the hard-link references are restored, the hard-linked files still point to the same inode as the other files to which they are linked. However, if you do not restore all the hard links, you can encounter anomalies as shown in the following examples.

1 comment:

Anonymous said...

TNX - I love this level of detail.