Question

Difficulty: HardMicrosoft Command-Line Tools

A network administrator is writing an automated script to perform a full synchronization backup of a shared data directory to a secondary backup server in a Windows domain environment. The backup operation must replicate the full directory hierarchy, remove files in the destination that have been deleted from the source, and copy all file data, attributes, timestamps, NTFS security access control lists (ACLs), owner information, and auditing flags. Which of the following flags must be included in the Robocopy command string to meet these requirements? (Select TWO.)

  1. /MIRAnswer
  2. /COPYALLAnswer
  3. C
    --archive --delete
  4. D
    /SFC

Answer

The parameters that must be included in the Robocopy command string are `/MIR` and `/COPYALL`.
The correct parameters are `/MIR` and `/COPYALL`. The `/MIR` switch mirrors a directory tree by copying all subdirectories (including empty ones) while purging destination files or folders that no longer exist in the source. The `/COPYALL` switch explicitly copies all file information, including Data, Attributes, Timestamps, NTFS Security (ACLs), Owner information, and Auditing flags (equivalent to `/COPY:DATSOU`).

Step-by-Step Solution

1
Identify the synchronization requirement
To mirror the directory structure and purge destination files that were removed from the source, the `/MIR` (Mirror) switch is required.
The `/MIR` flag combines `/E` (copy subdirectories, including empty ones) and `/PURGE` (delete destination files/folders that no longer exist in the source).
2
Identify the file attribute and security permission copying requirement
To preserve data, attributes, timestamps, NTFS ACLs, owner details, and auditing information, the `/COPYALL` switch must be specified.
The `/COPYALL` flag is shorthand for `/COPY:DATSOU`, ensuring complete security descriptor migration alongside file payload data.
3
Evaluate and discard invalid parameters
Reject Unix-based flags (`--archive --delete`) and unrelated system repair switches (`/SFC`).
Robocopy requires Windows-style switches preceded by forward slashes (`/`), and `/SFC` belongs to system file repair, not file replication.

Key Concept

Microsoft Command-Line Tools: Robocopy Switches
Estimated Time:2m 0s
Rate this question