Server 2008 robocopy access denied to user folders + /B error I don't understand

This is a two-parter.

A) Trying to do this in server 2008, with command being run by domain admin:

Robocopy \server\c$\users D:\backupfolder /MIR

I get "Access Denied" on all files in the user folders. This works on any server but 2008 though, so it must be the new security structure.

B) After reading, I attempted the /B for "backup mode" switch on robocopy. This says 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).

ERROR : Robocopy ran out of memory, exiting. ERROR : Invalid Parameter #%d : "%s"

My user is domain admin, also added to the local "backup operators" group on the server. What do I have to do to be allowed backup/restore user rights on a 2008 server?


Solution 1:

Lessons Learned:

  1. "User Account Control" is still of the devil. It was causing access denied for domain admin to read the user files.

  2. Once UAC was disabled, I was still getting access denied. This turned out to be due to server 2008's use of JUNCTION POINTS in the user profile directories. This made an recursive loop like this:

C:\users\username\appdata\appdata\appdata\appdata\appdata...

So, when using robocopy vs. a 2008 server apparently /XJD and /XJF are pretty important. (Those are for "exclude junction points for files/directory").

After addressing both above points, no more problems.

Solution 2:

I'll post my solution here if it helps someone else.

You need to add user or group to following Local Security Settings

  • Security settings\Local Policies\User Rights Assignment\Back up files and direcories
  • Security settings\Local Policies\User Rights Assignment\Restore files and direcories

Solution 3:

Make sure you run this command in command prompt you start with administrator privileges (right-click, Run as Administrator). The problems you are having sound like they are caused by the UAC.

Solution 4:

If it´s not working even with the "/B" switch, please try this hotfix:

Windows 2008 R2: http://support.microsoft.com/kb/979808/en-us Windows 2008: http://support.microsoft.com/kb/973776/en-us