Class HardLinkVarBackup
/var/backup
and creates hard links two or more matching files. As follows:
- Both are in /var/backup/hostname/####-##-## filenames (no partial or deleted)
- Are in different /var/backup/hostname/####-##-## directories
- Have the same exact path relative to their /var/backup/hostname/####-##-## directories
- Are on the same underlying partition
- Are both regular files
- Are not already linked together
- Have matching length
- Have matching modified time
- Have matching permissions
- Have matching ownership
- Have exactly matching file contents
This is accomplished by iterating through all /var/backup/hostname/####-##-## directories concurrently in a sorted manner such that each unique path is examined once. For each unique path, all directories having a file at that path will be compared by the above rules.
During a pass, the /var/backup/hostname/####-##-## may be renamed to .partial or .deleted by the backup server. Should this happen
either a FileNotFoundException
will be thrown or a directory listing will be null
or empty. In any of
these cases, the system will continue linking the other directories without interruption.
Through the complete pass, statistics will be kept. The statistics will be displayed every DISPLAY_INTERVAL
milliseconds. These will include:
- Total number of filesystem objects (unique paths from /var/backup)
- Total number of unique paths
- Total number of directories
- Total number of files
- Total number of symbolic links
- Total number of new hard links created
- Total number of bytes in all files
- Total number of bytes saved by new hard links (not disk blocks, just file bytes)
- Author:
- AO Industries, Inc.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
HardLinkVarBackup
public HardLinkVarBackup()
-
-
Method Details
-
main
-