New
#1
Attempting .bat Robocopy to USB drive, various errors
Apologies if the solution is found in another thread, but I have been unable to solve my problem so far.
I'm attempting to use Task Scheduler, to backup a folder of my projects to a 1 Tb USB drive via robocopy. I've been at this off and on for several days now, and I have had varying degrees of success. I work at a corporate company where IT can be strict. I have admin rights to my machine but I feel like I am still fairly restricted.
Currently, I have a .bat file, that when I run, it fails because I do not have backup and restore file user rights. Great. I get that. That is not my main problem. I know I need to change permissions some how. As far as I can tell, I have admin rights to all of the appropriate folders. I checked by right clicking, looking at security and seeing my user name in the groups and seeing that I have Full control, modify, read & execute, etc.
C:\Users\"MyUserName"\ - Full control
C:Users\"MyUserName"\_Projects - Looks like I have inherited full control rights
Side note, This may seem very noobish but I don't remember all of the folders being -Read Only- before. Not sure if this is a problem or if I did something to cause this.
Back to my main problem. At some point, I was able to run an iteration of my .bat file successfully, when I ran it manually. It copied all of the files I wanted to the correct USB drive. It was only once I tried to add it to Task Scheduler, the .bat file would fail. I looked through several forum posts describing that users needed to use a UNC path in order to back up to their network drive. However, I'm not using a network drive. I wasn't able to find out if there was a UNC path or not to a USB drive.
The errors that I have encounteres so far are: 0x1, 0x10, 0x8007052E
How can I set up a simple automated backup solution to a portable 1Tb USB drive?
Here is my current .bat file.
@echo on
robocopy C:\Users\MyUserName\_Projects E:\Project_BackUps /COPY:DAT /MIR /XJD /XJF /R:0 /NP /tee /B /LOG:BackUps_LogFile.txt
My task in Task Scheduler had the following selected:
-Run whether user is logged on or not
-Run with Highest Priviledges
-Configure for Windows Vista, Windows Server 2008
-Program/Script C:\Users\MyUserName\BackupProject.bat
-Star in (Optional): C:\Users\MyUserName\
- All 3 power options enabled under the Conditions tab
-Allow task to be run on demand