ZRobocopy: Fast, Reliable File Syncing for Windows Administrators

Getting Started with ZRobocopy — Commands, Options, and Best Practices

What ZRobocopy is

ZRobocopy is a Windows command-line file copy and sync tool based on Robocopy, extended with additional features (e.g., improved logging, parallelism, richer filters, or simpler syntax). It’s used for reliable one-way replication, incremental backups, and mirroring directories while preserving file attributes and NTFS metadata.

Basic usage

Typical command structure:

ZRobocopy   [] [Options]

Examples:

  • Mirror a folder:
ZRobocopy C:\Data D:\Backup /MIR /R:3 /W:5
  • Copy only changed files:
ZRobocopy C:\Data D:\Backup /XO /E

Important options (commonly used)

  • /MIR — Mirror a directory tree (equivalent to /E plus delete extra files in destination). Use with caution.
  • /E — Copy subdirectories, including empty ones.
  • /S — Copy subdirectories excluding empty ones.
  • /R:n — Number of retries on failed copies (default often 1 million; set lower).
  • /W:n — Wait time between retries in seconds.
  • /XO — Exclude older files (skip files older in source vs. destination).
  • /XN — Exclude newer files.
  • /XX — Exclude extra files and directories (opposite of /MIR deletion behavior).
  • /LOG: — Write detailed log to file (overwrites).
  • /LOG+: — Append to log file.
  • /MT[:n] — Multithreaded copy with n threads (speeds up many small files). Beware of high CPU/disk I/O.
  • /COPY:flags — Control what to copy (D=Data, A=Attributes, T=Timestamps, S=Security, O=Owner, U=Auditing). Example: /COPY:DAT
  • /SEC — Copy files with security (equivalent to /COPY:DATS).
  • /Z — Restartable mode (useful over unstable networks).
  • /ZB — Use restartable mode; if access denied, use backup mode.
  • /FFT — Assume FAT file times (2-second granularity) for compatibility with some drives.
  • /ETA — Show estimated time of arrival (completion).
  • /MAXAGE:/MINAGE, /MAXLAD:/MINLAD — Age/LAST ACCESS filters.

Best practices

  • Test with /L (list-only) first to preview actions without making changes.
  • Start with small datasets to verify options (especially /MIR and deletion flags).
  • Use /LOG or /LOG+ to record runs for auditing and troubleshooting.
  • Limit retries (/R) and wait times (/W) to reasonable values for automation.
  • Use /MT carefully; for large single-file copies it adds no benefit and can increase contention.
  • Preserve NTFS metadata when permissions and auditing are needed: include /COPY:SOU (or /SEC).
  • Schedule via Task Scheduler or scheduled job; ensure tasks run with an account that has needed permissions and network access.
  • Protect against accidental deletions: avoid running /MIR directly on production until validated; consider /XO and /

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *