Robocopy - Backup between network computers

0

I am trying to use Robocopy to perform a backup on a daily basis and only update files which have either been updated, or they are new files.

At the moment I am using the following script within a Batch file:-

@ECHO OFF

SETLOCAL

SET _source="\\REMOTE-SERVER\Share"

SET _dest="\\LS-WXLDE8\Shared_QP"

SET _what=/COPYALL /B /SEC /MIR
:: /COPYALL :: COPY ALL file info
:: /B :: copy files in Backup mode. 
:: /SEC :: copy files with SECurity
:: /MIR :: MIRror a directory tree 

SET _options=/R:0 /W:0 /LOG:MyLogfile.txt /NFL /NDL
:: /R:n :: number of Retries
:: /W:n :: Wait time between retries
:: /LOG :: Output log file
:: /NFL :: No file logging
:: /NDL :: No dir logging

ROBOCOPY %_source% %_dest% %_what% %_options% /MOT:1440

At the moment I am getting the following messages within my log file:-

-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows                              
-------------------------------------------------------------------------------

  Started : 10 December 2014 09:51:11
2014/12/10 09:51:13 ERROR 5 (0x00000005) Getting File System Type of Destination \\LS-WXLDE8\Shared_QP\
Access is denied.


   Source : \\REMOTE-SERVER\Share\
     Dest - \\LS-WXLDE8\Shared_QP\

    Files : *.*

  Options : *.* /NDL /NFL /S /E /DCOPY:DA /COPY:DATS /PURGE /MIR /B /MOT:1440 /R:0 /W:0 

------------------------------------------------------------------------------

NOTE : NTFS Security may not be copied - Destination may not be NTFS.

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"

ERROR : Invalid Job File, Line #%d :"%s"


  Started : %s %s

   Source %c 

     Dest %c 
       Simple Usage :: ROBOCOPY source destination /MIR

             source :: Source Directory (drive:\path or \\server\share\path).
        destination :: Destination Dir  (drive:\path or \\server\share\path).
               /MIR :: Mirror a complete directory tree.

    For more usage information run ROBOCOPY /?


****  /MIR can DELETE files as well as copy them !

I'm trying to backup from a Windows 8 Computer to a Buffalo Link Station Duo (NaS Drive) - I've allowed users / guests / admins on that folder for full permissions (read/write), can't find anywhere where you can add 'Network' privileges on the control panel, there is no option to add user groups.

Any ideas?

batch-file
cmd
robocopy
asked on Stack Overflow Dec 10, 2014 by nsilva • edited Dec 10, 2014 by nsilva

2 Answers

0

You don't have the right user permissions to access the directory.

answered on Stack Overflow Dec 10, 2014 by foxidrive
0

You need to run as Admin (right click on batch file and select "Run as Administrator"). You are most likely being blocked because of UAC if directory/file permissions are correct. I know this was posted forever ago, but figured I'd toss in a response since I am here.

answered on Stack Overflow Nov 15, 2019 by epicns

User contributions licensed under CC BY-SA 3.0