ThisCalculator

Everyday

Robocopy Backup Mode: What It Is and How to Use It

Updated · Standard formula, shown below

Average speed (MB/min) 1,706.67 MB/min
Time in hours
1.00 h
Result
Total time (min)
60 min
You entered
Data size (GB)
100 GB
You entered

Robocopy Backup Mode: What It Is and How to Use It

Robocopy backup mode is a set of command-line options that let you copy files while preserving all important attributes, timestamps, and security settings, and it is specifically designed for creating reliable backups. You enable it by adding the /B switch (backup mode) and often combine it with /MIR (mirror) or /COPYALL to copy everything. This article explains what backup mode does, how it differs from normal copying, and gives you the exact commands to use.

Formula

Robocopy backup mode itself doesn’t have a mathematical formula – it’s a set of file-copying behaviors. However, if you want to estimate how long a backup will take, you can use:

Average speed = (Data size in MB) / (Total time in minutes)

Where:

  • Data size – the total amount of data you’re copying, in gigabytes (GB) or megabytes (MB). 1 GB = 1024 MB.
  • Total time – the duration of the copy operation, in minutes.
  • Average speed – the resulting throughput, in MB per minute.

The calculator above uses the default values of 60 minutes and 100 GB to compute an average speed of about 1707 MB/min (roughly 28.5 MB/s).

Worked Example

Using the default values from the calculator:

  1. Data size = 100 GB. Convert to MB: 100 × 1024 = 102,400 MB.
  2. Total time = 60 minutes.
  3. Average speed = 102,400 MB ÷ 60 min = 1,706.67 MB/min.
  4. Time in hours = 60 min ÷ 60 = 1 hour.

So the calculator shows an average speed of 1,706.67 MB/min (rounded to 2 decimals) and a total time of 1 hour.

What Is Robocopy Backup Mode?

Robocopy (Robust File Copy) is a command-line tool built into Windows that copies files and directories with more options than the standard copy command. Backup mode, activated with the /B switch, lets Robocopy access files even if the current user doesn’t have explicit read permission on them. It does this by using the Windows backup privilege (SeBackupPrivilege), which is typically granted to administrators. This is crucial for backing up files that are locked or have restrictive ACLs (Access Control Lists).

Without backup mode, Robocopy might skip files it can’t read, producing an incomplete backup. With /B, it can copy files that are otherwise inaccessible to the user, making it ideal for system backups and migration.

How to Use Backup Mode

The basic syntax is:

robocopy <source> <destination> [files] [options]

To enable backup mode, add /B to the options. For example:

robocopy C:\Users\John D:\Backup /B /E

This copies all files and subdirectories (including empty ones) from the source to the destination, using backup mode. Common switches you’ll combine with /B:

  • /E – copy subdirectories, including empty ones.
  • /MIR – mirror the source to the destination, deleting files in the destination that no longer exist in the source.
  • /COPYALL – copy all file information (data, attributes, timestamps, ACLs, owner, audit info).
  • /DCOPY:T – copy directory timestamps.
  • /R:n – number of retries on failed copies (default is 1 million, which can hang the process).
  • /W:n – wait time between retries in seconds (default is 30).

A typical backup command might look like:

robocopy C:\Data D:\Backup /B /MIR /COPYALL /R:3 /W:5 /LOG:backup.log

This mirrors the data, copies everything, retries 3 times with 5-second waits, and writes a log file.

When Should You Use Backup Mode?

Use backup mode when you need to:

  • Back up files that might be locked by other applications (e.g., Outlook PST files, databases).
  • Copy files with restricted permissions, such as system files or other users’ profiles.
  • Create a full system backup or migrate to a new computer.
  • Ensure that ACLs and owner information are preserved (with /COPYALL).

For everyday file copying where you have full access, backup mode isn’t necessary, but it doesn’t hurt to include it. However, note that backup mode requires administrative privileges; if you’re not an admin, Robocopy will fail with an access denied error.

Common Problems and Mistakes

Several issues can trip up users:

  • Not running as administrator – Backup mode needs elevated privileges. Right-click Command Prompt and select “Run as administrator”.
  • Using /MIR without caution – Mirroring deletes files in the destination that aren’t in the source. If you point to the wrong destination, you can lose data. Always double-check paths.
  • Infinite retries – The default retry count is 1,000,000, which can make Robocopy hang on a stuck file. Set /R:3 or lower.
  • Forgetting to copy timestamps – By default, Robocopy copies file data and attributes, but not timestamps unless you specify /COPY:DAT (which is actually the default for data, attributes, and timestamps) or /COPYALL. Actually, the default is /COPY:DAT which copies Data, Attributes, and Timestamps, so that’s fine.
  • Not logging – Without a log file, you can’t verify what was copied or see errors. Use /LOG:filename or /TEE to display in console and log.

Backup Mode vs. Normal Copy

Normal copy (using copy or xcopy) reads files with the user’s permissions. If a file has an ACL that denies read access, the copy fails. Backup mode uses the backup privilege to read the raw file data, bypassing individual file permissions. This is similar to how backup software works behind the scenes.

Another difference: backup mode also copies the file’s attributes, such as hidden and system flags, which can be useful for preserving the exact state of the source. However, it does not copy the security descriptors (ACLs) unless you include /COPYALL or /SEC.

Alternatives to Robocopy Backup Mode

If you’re not comfortable with the command line, there are alternatives:

  • File History – Windows built-in backup for personal files, but it doesn’t copy system files or ACLs.
  • wbadmin – For full system backups, but it’s more complex.
  • Third-party tools – Many GUI backup programs use similar backup privileges under the hood, but they often cost money.

Robocopy remains a free, powerful option that’s already on every Windows system.

Frequently Asked Questions

Does Robocopy backup mode require admin rights?

Yes, the /B switch requires the user to have the SeBackupPrivilege, which is normally only granted to administrators. Run the command prompt as administrator to use backup mode.

What’s the difference between /B and /COPYALL?

/B enables backup mode, which allows reading files regardless of permissions. /COPYALL specifies what to copy: data, attributes, timestamps, ACLs, owner, and audit info. You can use them together (as in /B /COPYALL) to get both access and full metadata.

Can I use backup mode to copy open files?

Backup mode can read files that are open by other processes, but it may not capture the most recent changes if the file is being written to at that moment. For databases, it’s better to use a proper backup tool that coordinates with the application.

Why does Robocopy skip files even with /B?

If the file is locked by a system component or has a corrupted ACL, backup mode might still fail. Also, if the destination is full or the source is on a network share that doesn’t support backup semantics, you’ll see errors.

Is Robocopy backup mode safe for system drives?

It can copy system files, but it’s not a substitute for a full system image backup (like System Restore or wbadmin). It won’t capture the boot sector or system state. Use it for data backups, not for disaster recovery.

Related

Formula used
in t | Total time (min) | min | 60 | 0
in d | Data size (GB) | GB | 100 | 0
out speed | Average speed (MB/min) | MB/min | (d * 1024) / t | 2
out time_h | Time in hours | h | t / 60 | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.