Home > Commands A-M > Commands M

MIRROR


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Used to store information about a disk's file allocation table, boot record, and root directory (to be used later for file recovery).


Syntax

MIRROR [d: [...]] [/1] [/Td[entries] [...]]

To save a copy of the partition table on a floppy diskette:

MIRROR /PARTN

To unload from memory:

MIRROR /U


Parameters
d: [...] (v5.0)
Specifies the drive to be mirrored. If omitted, the current default drive is mirrored. More than one drive may be specified and mirrored.

Switches
/1 (v5.0)
Keep on one copy of recovery information (MIRROR.FIL). By default, mirror keeps 2 copies.
/PARTN (v5.0)
Saves copy of partition table to floppy diskette.
/t ( d [entries] [...] v5.0)
Mirror becomes a Terminate-and-Stay-Resident (TSR) that uses about 8K of RAM. This makes recovery with UNDELETE as assured as possible.

Entries is how many deletions to track. The default number varies from 25 (360K diskettes) through 300 (32M hard disk). You may specify more than one /td entry on the command-line.:

        DISK SIZE   ENTRIES   MAXIMUM FILE SIZE
         360Kb       25        5Kb
         720Kb       50        9Kb
         1.2Mb       75       14Kb
        1.44Mb       75       14Kb
          20Mb      101       18Kb
          32Mb      202       36Kb
         >32Mb      303       55Kb
/U (v5.0)
Attempts to unloads assured tracking Mirror from memory. Memory will only be freed if Mirror was the last TSR loaded.

Related

none.


Notes
Why use MIRROR?

The MIRROR command is used to save information that can be used later for file recovery using the UNDELETE and UNFORMAT commands. MIRROR creates a duplicate or MIRROR of this important information in case the original information becomes unreadable.


How does MIRROR save the information?

For each drive you specify, MIRROR creates a read-only file named MIRROR.FIL on the disk"s root directory. The file contains all the information that could be used later to recover deleted or damaged files, or even to rebuild the file structure of the entire disk.


When NOT to use MIRROR?

When using the MIRROR command, do not specify a network drive or a drive that has been previously specified using the JOIN, ASSIGN, or SUBST command.


Where did MIRROR.BAK come from?

If you do not use the /1 option and MIRROR finds a file on the disk named MIRROR.FIL, that file will be renamed MIRROR.BAK and a new file named MIRROR.FIL will be created.


Examples

To save a file with disk-recovery information for drives C and D, enter:

    MIRROR C:D:

This saves a copy of the FAT and root directory of the C and D drives to a hidden file named c:\mirror.fil and d:\mirror.fil. Unformat will be able to rebuild the disk to the state at the time this command was executed.


    MIRROR C:D: /Tc /Td

This creates a mirror.fil recovery file in the root directories of drives C and D. Also installs a TSR to monitor file deletions on both drives. This example provides maximum protection at the cost of some RAM and disk space used by the TSR. This syntax is often used in an Autoexec.Bat file.


    MIRROR /PARTN

This saves a copy of the current default disk's partition table to diskette. The resulting file can be used with an emergency disk to recover using UNFORMAT /PARTN


Errorlevels

none.


Availability
External Resident
DOS
v5.0 v5.0A v5.00.02 v5.001A v5.01 v5.02
Windows
none
Windows NT
none
External Resident Resource Kit
DOS
v6.0
Windows
none
Windows NT
none

Last Updated: 2003/07/28
Direct corrections or suggestions to: Rick Lively