Question

Difficulty: HardMicrosoft Command-Line Tools

A systems administrator is creating a custom batch script using the Windows `robocopy` command-line utility to mirror a sensitive department directory (`C:\FinanceData`) to a network backup target (`\\BackupServer\FinanceBackups`). The administrator must ensure that empty subdirectories are included in the transfer and that all NTFS security ACLs, file ownership, and auditing information are fully preserved. Which TWO of the following `robocopy` switches must be included in the command to fulfill these requirements?

  1. /EAnswer
  2. /COPYALLAnswer
  3. C
    /S
  4. D
    -a

Answer

The correct options are '/E' (to copy subdirectories including empty ones) and '/COPYALL' (to preserve all NTFS ACLs, ownership, and auditing information).
The '/E' switch forces robocopy to recursively copy all subdirectories, explicitly including empty ones. The '/COPYALL' switch copies all file information (Data, Attributes, Timestamps, NTFS ACLs, Owner, and Auditing info). Combining these two options ensures complete directory structure and security attribute replication.

Step-by-Step Solution

1
Identify the required switch for directory recursion including empty folders.
Selecting '/E' ensures that all subdirectories—including empty subdirectories—are copied, whereas '/S' excludes empty folders.
The scenario explicitly states that empty subdirectories must be included in the backup.
2
Identify the required switch for comprehensive security and file metadata preservation.
Selecting '/COPYALL' preserves Data, Attributes, Timestamps, NTFS Security ACLs, Owner information, and Auditing settings.
The scenario requires maintaining complete NTFS permissions, ownership, and auditing flags across the destination files.

Key Concept

Microsoft Windows Command-Line Backup Tools (Robocopy Switches)
Rate this question