How NetBackup determines that files are due for backup on UNIX

Incremental backups on UNIX clients look at all files and directories to determine if a backup is due based on a reference date. (That is, back up all the files that have changed since date_x).

UNIX files and directories have the following three times that are associated with them:

mtime

The file modification time. The file system updates the mtime for a file or directory each time the file is modified. An application can save the mtime of the file before modifying it. The application then resets it with the utime(2) system call.

atime

The file access time. The file system updates the atime for a file or directory each time the file is accessed (read or write). An application can save the atime of the file before accessing it. The application then resets it with the utime(2) system call.

ctime

The inode change time. The ctime for a file or directory is updated each time the file or directory's inode changes. (For example, changes due to permissions, ownership, and link-counts changes.) The ctime for a file or directory cannot be saved before and reset after a change. The ctime of a file or directory changes when the mtime and atime (changes with the utime(2) system call) is reset.

When NetBackup reads the data for a file that is included in a backup, it does not affect the file modification time. It does affect the access time of the file. For this reason, NetBackup saves the atime and mtime of the file before it reads the file. Then NetBackup resets the atime and mtime with the utime(2) system call. NetBackup does not cause problems for storage migration products or the administrator scripts that use file access times (atime) as criteria for their operations. While this benefit is obvious, a side effect is that it does update the ctime of the file.

Customers can configure NetBackup so that it does not reset the access time of the file after it reads a file. Customers can choose to have NetBackup use the ctime and the mtime of the file to determine what files to include in an incremental backup. Normally, these two options are used together, but there may be some sites that want to use one without the other. By default, NetBackup uses only the mtime of the file to determine what files and directories to back up.

When a file is moved from one location to another, the ctime of the file changes, but the mtime remains unchanged. If NetBackup uses only the mtime to determine the files that are due during an incremental backup, it does not detect these moved files. For sites where using the mtime might create a problem, use the ctime to determine files due to be included in an incremental backup. The ctime is used if the bp.conf file contains the USE_CTIME_FOR_INCREMENTALS and DO_NOT_RESET_FILE_ACCESS_TIME entries.

When a directory is moved from one location to another, the ctime of the directory changes, but the mtime remains unchanged. Neither the mtime nor the ctime are changed for the files or directories within the moved directory. No reliable method using file timestamps can determine that files within a moved directory need to be included in an incremental backup.

In either case, these moved files and directories are included in subsequent full backups.

More Information

How NetBackup determines that files are due for backup on Windows

Type of backup schedule attribute

About incremental backups

About the schedule Attributes tab