Robocopy: Backup rights on Windows 7

My Robocopy backup script has a few lines of:

robocopy D:\Source_Dir K:\Backup_Dir /MIR /B

This worked fine on Windows XP, but stopped working once I moved to Windows 7. Robocopy would give the following error:

ERROR : You do not have the Backup and Restore Files user rights.
*****  You need these to perform Backup copies (/B or /ZB).

Surprisingly, I would get this error even if I was logged onto an Administrator account!

The reason turned out to be that running in /B (Backup mode) requires permissions to open files without any security restrictions. With the UAC in Windows 7, even a normal invocation of cmd.exe by an Administrator account does not have these rights!

To run Robocopy in /B (Backup mode) one needs to start cmd explicitly with Administrator rights! To do this type cmd at the Start menu, right-click on cmd.exe and choose Run as Administrator. This works fine even from a non-Administrator account (assuming you know some Administrator credentials.)

6 thoughts on “Robocopy: Backup rights on Windows 7

  1. but what shoud i do if i have a relative path as source? .\
    if i run it as admin windows sets the relative path to c:\windows\system32\

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s