Robocopy fails with security error copying "from nas to nas". Why?

1

tl;dr

robocopy has security problems copying from 'nas to nas'

The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you.

Summary

I'm running into "windows permission problems" when making backups using using the following:

  • powershell
  • robocopy
  • Windows 2008R2
  • Windows task scheduler

Task Scheduler output

Taskscheduler runs under user domain account "OPS\backupuser"

The script succeeds when it copies "from local drive" "to the backup nas"

However it fails when the script copies "from another nas" "to the backup nas"

In pictures...

Success: local drive --copy-to--> backup NAS
Fails:   another NAS --copy-to--> backup NAS

Output

Robocopy fails with exit code 16.

Here is detailed output:

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

  Started : Thu Jul 07 22:22:11 2016

2016/07/07 22:22:26 ERROR 1265 (0x000004F1) Getting File System Type of Source \\app-data-nas.hosting.acme\bazapp$\production\foo_industries_prod\
The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you.

   Source - \\app-data-nas.hosting.acme\bazapp$\production\foo_industries_prod\
     Dest : \\dr-backup-nas\AppDR$\ALL_DR\FOO_INDUSTRIES_DR\foo_industries_prod\

    Files : *.*

  Options : *.* /NDL /S /E /COPY:DT /PURGE /MIR /B /NP /R:0 /W:1 

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

Other points

1) Because I the environment is 'locked down', I could not run this from the command line, either as :

  • my own account
  • my own account with elevated command prompt
  • OPS\backupuser

2) I tried adding '/NODCOPY' , but robocopy failed; apparently we don't have the hotfix for this option.

Thanks in advance!

ntfs
robocopy
asked on Stack Overflow Jul 29, 2016 by user331465

2 Answers

0

NAS drives are not Windows drives. You have to map to them uniquely and with certain admin privileges to make them "see" you're trying to copy stuff into them.

First map a drive to the NAS system using NET USE

Next copy the file(s) using ROBOCOPY thus...

robocopy <source path> <nas path> <file(s)> /s /j /r:2 /w:5 /log+:robocopy.log

Place it all inside a CMD file and run it from a Task Scheduler on your Windows server.

answered on Stack Overflow Aug 29, 2017 by Fandango68
0
>
>
>NAS drives are not Windows drives. You have to map to them uniquely and with certain >admin privileges to make them "see" you're trying to copy stuff into them.>
>
>First map a drive to the NAS system using NET USE
>
>Next copy the file(s) using ROBOCOPY thus...
>
    >robocopy <source path> <nas path> <file(s)> /s /j /r:2 /w:5 /log+:robocopy.log
>Place it all inside a CMD file and run it from a Task Scheduler on your Windows server.
>

You forgot: /FFT #":: assume FAT File Times (2-second granularity)" -ensures the copy ignores OS file system while copying in ROBOCOPY /Z #":: Includes LARGE file copy restart" - restarts large file copying where the copy left off in the file, instead of starting over again. Like in a 500 GB file it restarts at the byte the copy stopped at, in case you need to schedule offline copying and don't want large files to prevent the copy progression (will ONLY start over if the file date changed!) /xo #"exclude older files" -copies all new files - something useful to retry copies in Scheduled task Job of Robocopy...

All these are useful in NAS copying... as they tend to have issues resolved by these switches in ROBOCOPY.

answered on Stack Overflow Jul 5, 2019 by Patrick Burwell

User contributions licensed under CC BY-SA 3.0