A separate directory may be specified for mirror files. This feature allows mirror files without an absolute path name to be stored in a different path, perhaps on a different volume, from where the primary files are stored. This gives an extra level of security by decreasing the chances that both files are damaged at the same time.
Adding MIRROR_DIRECTORY <directory name> to the configuration information permits mirrored files WITHOUT an absolute path name to be placed in a specified mirror directory. This is analogous to LOCAL_DIRECTORY except that it only applies to the mirror in a primary|mirror pair. Effectively, the discrimination between the primary and mirror names applies to opens, creates, renames and deletes.
The following table describes how mirrored names are handled based on the settings for the Server configuration options LOCAL_DIRECTORY, SERVER_DIRECTORY (deprecated), and MIRROR_DIRECTORY:
Local Directory |
Server Directory |
Mirror Directory |
Mirror |
---|---|---|---|
work\ |
|
|
work\mirror.dat* |
work\ |
|
mirror\ |
mirror\mirror.dat |
|
|
mirror\ |
mirror\mirror.dat |
|
|
|
mirror.dat |
|
perm\ |
|
mirror.dat* |
|
perm\ |
mirror\ |
mirror\mirror.dat |
*The main point to observe is that SERVER_DIRECTORY does not affect mirror files, and if LOCAL_DIRECTORY is used and MIRROR_DIRECTORY is not, it is as if MIRROR_DIRECTORY were set the same as LOCAL_DIRECTORY.