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?

link|improve this question

80% accept rate
feedback

5 Answers

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.

link|improve this answer
feedback
up vote 1 down vote accepted

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.

link|improve this answer
feedback

You may be running into an issue I've come across with robocopy, the /B (and /ZB) switches don't always work effectively on remote targets (ie shares). Do you have the same problem if you try to do this in the other direction ie with Robocopy running on the W2K8 server and pushing the data to your backup folder?

link|improve this answer
I cannot even have a /B flag on robocopy C:\test D:\test -- I get the same "you lack the rights to use /B" error. – Aszurom Nov 10 '09 at 15:36
sorry, missed that. Your account needs to be either a member of the Backup Operators group or the local administrator's group on both ends to invoke /b. This is a new behaviour with user profiles with W2k8/Vista/Windows 7. – Helvick Nov 10 '09 at 17:44
feedback

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
link|improve this answer
feedback

see http://calebs71.blogspot.com/2009/12/robocopy-and-server-2008-script-error.html

link|improve this answer
Welcome to Server Fault! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Iain Mar 28 at 15:44
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.